DropDownList select [modified]
-
I have two dropdownlist for one choice..Like Height is taken in feet and in cms. When a user selects either of feet or cms the page becomes valid if not it will throw the relevant error in validation summary.... How should I implement this now..... The code goes here.... -in Cms- 137cms 138cms How shall i implement requiredfieldvalidator that checks whether either of this one is selected r not....and throws error in validation summary if not selected
-
I have two dropdownlist for one choice..Like Height is taken in feet and in cms. When a user selects either of feet or cms the page becomes valid if not it will throw the relevant error in validation summary.... How should I implement this now..... The code goes here.... -in Cms- 137cms 138cms How shall i implement requiredfieldvalidator that checks whether either of this one is selected r not....and throws error in validation summary if not selected
In requiredfieldvalidator there is a property 'ControlToValidate' Set this property to your dropdown control to validate. Set 'ErrorMessage'. You may need to set 'InitialValue' to 0. Good Luck. http://www.programmingknowledge.com/[^]
-
In requiredfieldvalidator there is a property 'ControlToValidate' Set this property to your dropdown control to validate. Set 'ErrorMessage'. You may need to set 'InitialValue' to 0. Good Luck. http://www.programmingknowledge.com/[^]
-
As been told, how can one requiredfieldvalidator check for two dropdownlistboxes? Initial value is set but it doesnt make a difference at all..
-
I have two dropdownlist for one choice..Like Height is taken in feet and in cms. When a user selects either of feet or cms the page becomes valid if not it will throw the relevant error in validation summary.... How should I implement this now..... The code goes here.... -in Cms- 137cms 138cms How shall i implement requiredfieldvalidator that checks whether either of this one is selected r not....and throws error in validation summary if not selected
Hi, You can use javascript for this: function checkDropDowns() { var ddl1 = document.getElementById('ddl1'); var ddl2 = document.getElementById('ddl2'); if(ddl1.options[0].selected == true && ddl2.options[0].selected == true) { alert("Please Select One Value From Atleast One DropDown Box!!"); return false; } } I guess this works for you, Thanks Sushant Duggal.