Validating in a web user control

If you set the Validation Group property of Text Box1, Required Field Validator1 and Button1 to some string (say VG) and then run the Web Form you will find that upon clicking any of the Submit buttons both the Required Field Validatior controls show the error.This behavior is undesirable and causes due to the fact that both the instances of the user control use the same Validation Group value.A User Control can't be displayed directly in the browser - it has to be included on a page. Hi, I have a user control which has some server controls like drop down list, list box etc. I'm using this control in a parent page which has its own server controls which are also required. NET 1.1 (VS 2003) Thanks a lot Kiran The button on the parent page which is supposed to validate the controls is not working after I add the web user control. This is very easy, but also very anonymous - because we just use the Load Control method, we can't really use our own, custom properties. In the next example, we do just that, then we set the properties, and at last, we add it to the Place Holder: User Info Box Control user Info Box Control = (User Info Box Control)Load Control("~/User Info Box Control.ascx"); user Info Box Control. Okay, so we will be building a User Control for displaying information about a community user.

On your page, define it like this: We use the Load Control method to instantiate the User Control by specifying the path. On the page, add the following declaration in the top: Now we can access the User Info Box Control class like if it were a regular class, which also means that we can typecast the User Control returned by the Load Control method to this type.

The button on the parent page which is supposed to validate the controls is not working after I add the web user control. I tried calling a javascript on button click which calls Page_Client Validate() which doesnt seem to work either. Is there a work-around for this scenario other than manually calling Page.

Is there a work-around for this scenario other than manually calling Page.

You will see only one line of code, the User Control declaration.

As mentioned, this control will be displaying information about a user, so let's get started adding some markup to do so: As you can see, it's all very basic.

Leave a Reply

  1. Free live sae cam sex 07-Sep-2019 21:21

    A new app’s creators think they know the key to dating success: a trivia-oriented game show where the questions revolve around a bachelorette.

  2. canada christian dating sites 06-Sep-2019 20:02

    Corruption may have occurred if Outlook stopped responding.

  3. ft pierce florida black dating 27-Apr-2019 01:32

    Includes 5 new commanders created by the community, available to all players. Uploading images is another really easy way to help out - see the Special: Upload page!