0

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>
    <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

  • if the asp:LinkButton is rendered on the server within an UpdatePanel then a partial page rendering should still render that link button. Can you please elaborate on "I think that is because the link button is rendered using a script and that script is not run after the post back." ... What do you mean by "script" in this context? how do you render the link button using whatever type of script this is? Thanks – jwwishart Mar 24 '10 at 06:47
  • Need more information. The sample you provided does not exhibit the behavior you described. The sample works as expected. – AMissico Mar 24 '10 at 06:48

1 Answers1

0

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