losing button.click events after initial biased postback updatepanel
i have page unparalleled instance usercontrol itself unparalleled updatepanel. inside updatepanel several symbol controls. click eventuality controls connected adult code-behind, init eventuality usercontrol.
i click eventuality initial symbol i push, each time, problem. after that, i wholly click events symbol (searchbutton) - rest ignored. i have enclosed formula control next - effect brevity, i have expelled click eventuality handler methods, nonetheless customary "void button_click(object sender, eventargs e)" variety. any ideas?
<asp:updatepanel id="pickerupdatepanel" runat="server" updatemode="conditional">
<contenttemplate>
<asp:panel id="container" runat="server">
<div>
<asp:textbox id="pickerresults" runat="server" style="margin-right: 3px;" skinid="plain" />
<asp:image
id="launchpopup" runat="server" imageurl="~/images/icons/user_manage.png"
imagealign="top" bordercolor="#294254" borderstyle="dotted" borderwidth="1px"
height="20px" width="20px" style="cursor: pointer;" />
</div>
<asp:panel id="pickerpanel" runat="server" defaultbutton="okbutton" cssclass="popupdialog" style="height: 227px; width: 400px; padding: 5px; display: none;">
<asp:panel runat="server" id="contactpickersearchparams" style="margin-bottom: 3px;" defaultbutton="searchbutton">
search: <asp:textbox id="searchterms" runat="server" style="margin-right: 3px;" width="266px" skinid="plain" />
<asp:button id="searchbutton" runat="server" text="go" width="60px" skinid="plain" />
</asp:panel>
<asp:listbox id="searchresults" runat="server" height="150px" width="100%" selectionmode="multiple" style="margin-bottom: 3px;" />
<asp:button id="addbutton" runat="server" text="add >>" style="margin-right: 3px;" width="60px" skinid="plain" />
<asp:textbox id="chosenpeople" runat="server" width="325px" skinid="plain" />
<div style="float: left;">
<asp:button id="addnewcontact" runat="server" skinid="plain" width="150px" text="new contact" />
</div>
<div style="text-align: right;">
<asp:button id="okbutton" runat="server" text="ok" skinid="plain" width="100px" />
</div>
<input id="selectedcontacts" runat="server" visible="false" />
</asp:panel>
<ajax:popupcontrolextender id="pickerpopex" runat="server" popupcontrolid="pickerpanel" targetcontrolid="launchpopup" position="bottom" />
</asp:panel>
</contenttemplate>
<triggers>
<asp:asyncpostbacktrigger controlid="addbutton" eventname="click" />
<asp:asyncpostbacktrigger controlid="searchbutton" eventname="click" />
<asp:asyncpostbacktrigger controlid="addnewcontact" eventname="click" />
</triggers>
</asp:updatepanel>
public biased category contactpicker : system.web.ui.usercontrol
{
stable vacant page_init(object sender, eventargs e)
{
searchbutton.click += new eventhandler(searchbutton_click);
addbutton.click += new eventhandler(addbutton_click);
okbutton.click += new eventhandler(okbutton_click);
}
// formula left out
}
Comments
Post a Comment