LinkButton inside UpdatePanel disappears after partial page postback
I have a linkbutton inside a updatepanel and when the update panel does a partial page rendering, the linkbutton disappears.
<asp:UpdatePanel ID="up" runat="server" ChildrenAsTriggers="true" UpdateMode="Conditional">
<ContentTemplate>
<asp:DropDownList ID="drp" runat="server" AutoPostBack="true" CausesValidation="true">
<asp:ListItem Text="" Value="" />
<asp:ListItem Text="a" Value="a" />
<asp:ListItem Text="b" Value="b" />
<asp:ListItem Text="c" Value="c" />
</asp:DropDownList>
开发者_Go百科 <asp:LinkButton ID="link" Text="abc" runat="server" />
</ContentTemplate>
I think that is because the link button is rendered using a script and that script is not run after the post back.
How do I overcome this?
Thanks,
Eric
Thank you to all considered my question. I found out the reason is on our side. Apparently in our company we have overwritten the rendering of LinkButton in order to support browsers without javascript, in which case the LinkButton will be rendered as a normal input button. This is done using the and block within HTML. The script that generate the anchor tag is not run after partial page postback. I am looking at a fix for it now. Eric
精彩评论