Results 1 to 2 of 2

Thread: How to create requirevalidation programatically???

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2004
    Location
    fda
    Posts
    17

    How to create requirevalidation programatically???

    Hi everyone

    I'm building a web application which create a lot of HTML textboxes (not
    datagrid) to get input from user. Being assosiate with a textboxe is a
    requiredfield validator. The code is below. I don't know why after hitting
    submit button, it does show me the error such as "*" symbol next to the box.
    After I filled out those textboxes again and hit button to process the page.
    It does not do anything, look like still waiting for an event.

    RequiredFieldValidator dateValid = new RequiredFieldValidator();

    dateValid.ID = "required" + stringID ;

    dateValid.ControlToValidate = stringID;

    dateValid.Display = ValidatorDisplay.Dynamic;



    I would like to ask for a solution.



    Thanks

  2. #2
    Frenzied Member
    Join Date
    May 2002
    Posts
    1,602
    Hmm... looks like you need to create a delegate that handle the event...? I don't have vs.net in front of me... but it sounds like you have forgotten to take care of an event here...

    It is possible to create validators automatically...no problem on that end...


    try to create a validation object by the VS.NET iDE and check the autogenerated code... Im sure there is an event somewhere..


    kind regards
    Henrik

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width