我們正面臨着與SharePoint 2013中的updatepanel相關的問題。我們有一個包含標籤和按鈕的示例web部件,我們希望在不刷新整個按鈕的情況下在按鈕的點擊事件中編寫標籤頁。我們的示例代碼如下:在SharePoint中使用UpdatePanel 2013 web部件
<asp:UpdatePanel runat="server" ID="UpdatePanel1">
<ContentTemplate>
<asp:Label ID="lbl" runat="server" Text="Loaded" Visible="true"></asp:Label>
<asp:Button ID="btn" runat="server" OnClick="btn_Click"/>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btn" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
protected void btn_Click(object sender, EventArgs e)
{
lbl.Text = "BUTTON CLICKED !";
lbl.Visible = true;
}
我們試圖在這個link提到的解決方案,但不能達到我們的目標。
任何針對此問題的解決方案以及示例代碼都將受到高度讚賞。
謝謝。