Validate ASP.NET Controls

Total Post:14


 2094  View(s)
Rate this:

Here I just want to ask,

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

Thanks in advance.

  1. Re: Validate ASP.NET Controls

    hi carl,

    To validate the 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


Please check, If you want to make this post sponsored

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