Validate ASP.NET Controls

Total Post:14

Points:98

 2076  View(s)
Ratings:
Rate this:

Here I just want to ask,

How to validate asp.net controls dynamically using validation controls such as RequiredFieldValidator etc. of asp.net

Thanks in advance.

  1. Re: Validate ASP.NET Controls

    hi carl,

    To validate the asp.net controls dynamically you can use the above code:

    RequiredFieldValidator required = new RequiredFieldValidator(); //create object
    required.ControlToValidate = "RadioButtonList1; //bind control
    required.ErrorMessage = "Choose option"; //specify message
    this.form1.Controls.Add(required); // add the control

Answer

Please check, If you want to make this post sponsored

You are not a Sponsored Member. Click Here to Subscribe the Membership.