简体   繁体   中英

__doPostBack on event works only once

I have a hidden asp control that has a server event to it (valuechanged). I call the javascript __doPostBack method and as a parameter I send the id of the hidden control which makes it raise the valuechanged event after the Page_Load. It works fine for the first time, but the other times it posts back without raising the event. Is there anything I am missing here? Is it caching the postback?

EDIT:

The hidden field is in an updatepanel, so the __doPostBack doesn't refresh the whole page

Well silly me. It won't raise the valuechanged event if you call __doPostBack on a control that its value remained the same! Oopsie...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM