Monday, 15 August 2011

Proper validation is ASP.net -


I have a field ProductID and another field is ProductName. I would like a validation where the product ID has been entered and the product type If not selected, the user should select the product name (combo box) to click the submit button. What would be the proper way to do this? I do not want to write any script, so can not use custom verifier. How can I write it more? I am using ASP.NET C #.

Thanks

You can use jQuery very easily Just wire one click event handler on your submit button. Take a look at this Bela - Click

JQuery code

  $ ("# btn") ( Val () = "" & amp; $ ("# field2"). Val () == "") {Warning ("Please select field 2"); }      return false; });  

No comments:

Post a Comment