8,834
社区成员
发帖
与我相关
我的任务
分享
<cc1:TabPanel ID="tpPO" runat="server" HeaderText="Purchase Order" TabIndex="2" Enabled="false">
<ContentTemplate>
<slc:DC2 runat="server" ID="dcPO" />
</ContentTemplate>
</cc1:TabPanel>
<cc1:TabPanel ID="tpPO" runat="server" HeaderText="Purchase Order" TabIndex="2" Enabled="false">
<ContentTemplate>
<asp:PlaceHolder ID ="ph_dc2" runat="server"></asp:PlaceHolder>
</ContentTemplate>
</cc1:TabPanel>
再在TabIndexChange方法中这样写
Control dc2 = LoadControl("DC2.ascx");
ph_dc2.Controls.Add(dc2);
因为这些控件,全是用在UpdatePanel里的。
而用户控件里又需要按钮向后台请求。
向T型台请求时,必然会进主页面so.aspx页面的Page_Load方法中,这样就会把用户控件里的数据刷掉了。导致获取不到数据。