Ascx:
<div id="temasatratar" onclick="__doPostBack('fakeButton', '');"><h1>Temas a tratar</h1></div>
<asp:LinkButton ID="fakeButton" style="display:none" runat="server" Text="foo" OnClick="fakeButton_Click" />
<asp:UpdatePanel ID="UpdatePanel1" runat="server" onload="UpdatePanel1_Load">
<ContentTemplate>
<asp:Label runat="server" ID="Label1" />
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="fakeButton" />
</Triggers>
</asp:UpdatePanel>
后面的代码:
protected void fakeButton_Click(Object sender, EventArgs e)
{
UpdatePanel1.Update();
}
protected void UpdatePanel1_Load(object sender, EventArgs e)
{
Random ran = new Random();
int x = ran.Next(9999);
Label1.Text = x.ToString();
}
问题:代码完全充值页面,没有UploadPanel1。怎么只充值UploadPanel1?
有什么建议吗?
我的应用程序:C#/Visual web Part/Asp.Net/Visual Studio