UpdatePanel change my Table style

2019-08-12 07:40发布

i use nested usercontrol in my form when page load i dont have any problem but when i checked my checkBox which is in an updatepanel my whole style ruined what is the problem ?

foreach (TableCell item in TC_mdfItems)
    {
        foreach (var item2 in item.Controls)
        {
            ((item2 as MdfItem).FindControl("CHKB_Select") as CheckBox).Checked = this.WCHK_RowSelector.Checked;
        }
    }

i use the marked check box to select all usercontrol in that row then it changes my style

when I'm not using update panel its working but i want to do it with Ajax

1条回答
甜甜的少女心
2楼-- · 2019-08-12 08:28

i change my code this way

<asp:UpdatePanel ID="UP_MdfRow" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
    <div id="TableDIV" runat="server"></div>
</ContentTemplate>

when i add my usercontrol's table to div element it works fine .

thank you all

查看更多
登录 后发表回答