views:

19

answers:

1

if i use onchange=return fn1(), in client side even the fn1 return false it automatically fired the server side onselectedindexchange event,How i can i stop the server side event if the script fn1 return false...

A: 

you can't, I had a similar problem too, not long time ago... simply putted asp.net controls where is initialized to invoke postback it will, there is no way you can elegantly prevent that...

instead of trying to intercept invoked postback on your index_changed and blocked or not, you can put one hidden button and then from client decide when you will fire that postback through client call on that button(button.click())..

not so nice, but I didn't find a better solution for that scenario

cheers

p.s. oh, yes you need to remove autopostback="true" on that dropdown control

Marko