我有兩個UpdatePanel。一個UpdatePanel
具有CheckBox
和UserControl
。 UserControl有一些TextBoxes
。在其他更新面板中,很少有Labels
。使用第一個更新面板中的複選框更新第二個更新面板
我已將javascript功能添加到複選框來隱藏/顯示它。我正在使用Javascript來避免部分回傳到服務器。
我也想更新第二個UpdatePanel時,複選框被選中/取消選中或某些數據在用戶控件的文本框中的更改。
我可以在同一個複選框上調用javascript函數以及服務器端函數嗎?我嘗試添加觸發器到第二個更新面板,但它們沒有被解僱。
updatepanel1
checkbox
usercontrol
textbox1
texbox2
updatepanel2
label1 (updated on change of textbox 1)
label2 (updated on change of textbox 1)
我複選框markupd看起來像這樣
<asp:CheckBox ID="chkShippingSameAsBilling" runat="server"
Text=" Ship to same address"
AutoPostBack="true" Checked="true"
onclick="return ShowShippingAddress();"
/>
什麼的UpdatePanel? –
ajax updatepanel – DotnetSparrow
不知道從JavaScript更新,但你有沒有嘗試'updatepanel1.Update()'在服務器端? – yogi