|
-
Jan 27th, 2004, 09:13 AM
#1
Thread Starter
Junior Member
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
-
Jan 27th, 2004, 04:11 PM
#2
Frenzied Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|