Error
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.

validation

How to enable or disable asp.net validation control using javascript
Thursday, 15 December 2011 00:26
Here is the solution to enable/disable asp.net validation using javascript

Suppose i have dropdown which contain list of Asian countries and Other when user are selecting Other than only txtOtherCity is enbled else disable at that i disable required field validation for Other city (rfvOtherCity)


//Syntax:
ValidatorEnable(ValidatorContronName,Boolean);
//Explanation:
ValidatorContronName:This is ClientID of the Validation control.
Boolean:true(Enable) or false(Disable)
//Example:
ValidatorEnable(document.getElementById('<%=rfvOtherCity.ClientID%>'), false);

Read more: http://feeds.dzone.com/~r/dzone/snippets/~3/qvxaBPmcAfU/14185

 


Taxonomy by Zaragoza Online