Reputation: 3171
i am creating textboxes when a button is clicked and again and again and so on
while accepting input i need to check if the boxes are all full,
i know how to do this using design view but how to do this using coding
that is add and validation control to the textbox when it created before initializing/adding it to the page.?
validation should be not null..
Upvotes: 0
Views: 1032
Reputation: 8233
So as for validating the user input I would stay away from the ASP.Net Control Validators as hardly anyone in industry uses them. I would use the jQuery validator plugin which is included in a new Visual Studio project by default. You will still want Server side checking but it is much easier to call String.isNullOrEmpty(txtBox.Text) rather than using the Control Validators.
Upvotes: 1