开发者

LinkButton inside UpdatePanel disappears after partial page postback

开发者 https://www.devze.com 2022-12-24 23:24 出处:网络
I have a linkbutton inside a updatepanel and when the update panel does a partial page rendering, the linkbutton disappears.

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号