Regular Expression needed...
-
Dear All I want to creat a regular expression for a dropdown list My first item in the dropdown list is "Please Select One..." So i want to create a regular expression to validate this i mean, i don't want to keep the dropdownlist with it's default selected value, i want to force the user to select one item And if there is a better solution for that, please tell me about it :D Thanx in advance
Best Regards 3ala2 :)
-
Dear All I want to creat a regular expression for a dropdown list My first item in the dropdown list is "Please Select One..." So i want to create a regular expression to validate this i mean, i don't want to keep the dropdownlist with it's default selected value, i want to force the user to select one item And if there is a better solution for that, please tell me about it :D Thanx in advance
Best Regards 3ala2 :)
Hi you have to use requiredfieldvalidator and set the property Initialvalue = "Please Select One..." Regards smruti Smruti
-
Dear All I want to creat a regular expression for a dropdown list My first item in the dropdown list is "Please Select One..." So i want to create a regular expression to validate this i mean, i don't want to keep the dropdownlist with it's default selected value, i want to force the user to select one item And if there is a better solution for that, please tell me about it :D Thanx in advance
Best Regards 3ala2 :)
-
try this javascript and let me know.... function ValidateDegree(source,arguments) { if (document.Form1.DDLDegreeName.value == 0) { arguments.IsValid=false; return false; } else { arguments.IsValid=true; } }
-
Thanx for the quick response :D Where to put this code?
samerh wrote:
ClientValidationFunction="ValidateDegree">
and what event to call the previous one? and what if i had other valdators? would they still work fine? Thanx again
Best Regards 3ala2 :)
-
use custom validator with ClientValidationFunction="ValidateDegree". It will work. Man i need a favor on Any idea on how to encrypt password in web.config?
:D I don't wanna use the custom validator beacause it soes a postback, anyway, here r some links for ur issue http://mishler.net/2006/04/18/AspNet+Membership+Password+Administration.aspx[^] http://weblogs.asp.net/pleloup/archive/2003/07/04/9701.aspx[^] Hope this would help
Best Regards 3ala2 :)