View Full Version : .net dropedown

11-20-2003, 07:17 AM
how to give onchange javascript validation for dropdownlist

basically what I want to do is if user selecting selectedIndex=0 then don't refresh & don't call the server site function else refresh

11-20-2003, 01:21 PM
If you are going to want it to autopost back, then you are stuck with it with the best of my knowledge

just make sure that you are checking for IsPostBack to help on the loading process of the page.

11-20-2003, 02:38 PM
for any javascript it's allways the same for each .Net control


you will find everywhere a javascript for your case

11-20-2003, 03:21 PM

ebco does not want the page to autoRepostback with the option is zero. You can not stop that with JavaScript....

11-20-2003, 03:51 PM
but he says : don't refresh & don't call the server site

then it's a validation ClientSide without postBack
you can use your own Javacript or webControls validators

same thing for a delete button in a datagrid You can use a javascript before submitting the page : "are you shure you want to kill this customer ?"
if no there is no postback, if yes ... tool late