datalist itemcommand doesn’t fire的问题

asp.net datalist如果在 page_load里加载 databind(),asp:button的itemCommand event doesn’t fire。 Scott have done great work to solve this problem. Thanks. For detailed information and underlying cause, please visit his blog entry at: http://scottonwriting.net/sowblog/posts/1268.aspx
 
Soution:
1) disable the viewstate (set to false) of list objects (datalist, repeater, datagrid, etc)
or 2) don’t put databind() in page_load when posting back which will reset page’s all children controls in turn causing itemCommand not firing.
 
for our matter met, the first solution is ok.
Read on mobile:qr code

Leave a Reply

Your email address will not be published. Required fields are marked *