c# - Hidden field not updated in updatepanel after putting listview into insert mode -
i'm having problem hidden field value set in code-behind not propagate client. basic layout follows:
<asp:updatepanel ..... <contenttemplate .... <input id="myhiddenfield" type="hidden" value="" runat="server" .... <asp:listview id="mylistview" ..... i have button on click event, in there set hidden field value. if don't put listview insert mode, value propagated client; however, if put listview insert mode, nothing. i'm rebinding datasource on listview.
void mybutton_click(object sender, eventargs e) { myhiddenfield.value = "testing"; mylist.insertitemposition = insertitemposition.firstitem; mylist.datasource = // datasource mylist.databind(); } side note: i'm rebinding listview data bound delegate can called , can stuff in there.
instead of <input id="myhiddenfield" type="hidden" value="" runat="server" use <asp:hiddenfield id="myhiddenfield" runat="server" /> , should fine.
Comments
Post a Comment