If I use onchange=return fn1()
, in client side even the fn1
return false it automatically fi开发者_如何学运维red the server side onselectedindexchange
event. How can I stop the server side event if the script fn1
return false?
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
精彩评论