~~~~UpdatePanel与TabContainer的问题
请问高手,UpdatePanel中的Triggers如何对应到TabContainer里的button等控件?
谢谢!
<asp:ScriptManager runat="Server" EnablePartialRendering="true" ID="ScriptManager1"/>
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
<ContentTemplate>
<ajaxToolkit:TabContainer runat="server" ID="Tabs" Height="370px" OnClientActiveTabChanged="ActiveTabChanged" ActiveTabIndex="0" Width="800px">
<ajaxToolkit:TabPanel runat="server" ID="TabPanel1" HeaderText="崗位說明書主要內容">
<ContentTemplate>
...
<asp:Button runat="server" ID="btnUpdate" Text="Update"/>
</ContentTemplate>
</ajaxToolkit:TabPanel>
</ajaxToolkit:TabContainer>
<asp:GridView runat="server" id="gv01"/>
</contenttemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID= "btnUpdate"/>
</Triggers>
</asp:UpdatePanel>
上面的写法报错:
A control with ID 'btnUpdate' could not be found for the trigger in UpdatePanel ''.
[最优解释]
TabContainer$TabPanel1$btnUpdate
[其他解释]
知道了,是这样:
<asp:AsyncPostBackTrigger ControlID= "TabContainer$TabPanel1$btnUpdate"/>
[其他解释]
试试看你的方法对不对?