Client side validators not emitting

J

John Livermore

I am unable to get ASP.NET to send down Javascript to my IE 6.0
browser for client side validation.

To simplify the problem I have the following code snippet in from User
Control that creates a validator and emits HTML for Textbox.

control = //my Textbox control
RequiredFieldValidator validator = new RequiredFieldValidator();
control.ID="testid";
validator.ControlToValidate = control.ID;
validator.EnableClientScript = true;

When the page emits no Javascript appears on the page related to
validation. In my
'C:\Inetpub\wwwroot\aspnet_client\system_web\1_1_4322' directory there
is a WebUIValidation.js file. So that doesn't seem to be the issue.

Any ideas?

Thanks!
John
 
J

John Livermore

figure out the problem.

control.Controls.Add(validator);

causes the validation to emit properly.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top