I have some code inside of an asp:UpdatePanel that after clicking a button. it'll will hide a Label and replace that with an editable Textbox. This functionality all works fine within the UpdatePanel, however after clicking this button to make the call (which is also inside of the UpdatePanel), it causes asp:LinkButtons that appear after and outside of the UpdatePanel not to work anymore. These links work prior to interacting with controls inside of the UpdatePanel, but stop working after the fact. It's worth noting that these linkbuttons are dynamically created and appended to an existing div that follows and is not inside the UpdatePanel causing this issue. For good measure I tried calling the method that dynamically creates and appends these controls whenever the update panel made a callback to the server, but to no avail.
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<label class="reportModeLabel">Primary Mode: </label>
<div id="divShowMode" runat="server" class="inlineItem">
<asp:Label ID="lblPrimaryMode" runat="server"></asp:Label>
<asp:LinkButton ID="lnkPrimaryMode" runat="server" CssClass="clickOnce" OnClick="lnkPrimaryMode_Click">
<asp:Image ID="imgChangePrimaryMode" runat="server" CssClass="imgReportUpdateMenuItem" ImageUrl="~/Images/Edit.png" />
</asp:LinkButton>
</div>
<div id="divUpdateMode" runat="server" class="inlineItem" >
<asp:DropdownList ID="ddlModeOfTransmission" runat="server" Width="40%" CssClass="metaItemDropdown">
<asp:ListItem Text="Food" Value="1"></asp:ListItem>
<asp:ListItem Text="Water" Value="2"></asp:ListItem>
<asp:ListItem Text="Animal" Value="3"></asp:ListItem>
<asp:ListItem Text="Person to Person" Value="4"></asp:ListItem>
<asp:ListItem Text="Environmental" Value="5"></asp:ListItem>
<asp:ListItem Text="Other/Unknown" Value="6"></asp:ListItem>
</asp:DropdownList>
<asp:LinkButton ID="lnkPrimaryModeSave" runat="server" CssClass="clickOnce" OnClick="lnkPrimaryModeSave_Click">
<asp:Image ID="imgPrimaryModeSave" runat="server" ImageUrl="~/Images/Check-Selected.png" />
</asp:LinkButton>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div class="divWizardMenu">
//The link button controls that no longer work after using the
//UpdatePanel are dynamically created on server and added here
<ul id="ulMainMenu" runat="server"/>
</div>
//UpdatePanel ajax calls
protected void lnkPrimaryMode_Click(object sender, EventArgs e)
{
divShowMode.Visible = false;
divUpdateMode.Visible = true;
ddlModeOfTransmission.SelectedValue = Record.PrimaryModeOfTransmissionID.ToString();
}
protected void lnkPrimaryModeSave_Click(object sender, EventArgs e)
{
divUpdateMode.Visible = false;
divShowMode.Visible = true;
}