<
script runat
=
"
server
"
>
protected void Button1_Click( object sender, EventArgs e)
... {
int a = int.Parse(this.TextBox1.Text);
int b = int.Parse(this.TextBox2.Text);
int c=a+b;
System.Threading.Thread.Sleep(2000); //摸拟网络延时
this.Label1.Text = c.ToString();
}
</ script >
protected void Button1_Click( object sender, EventArgs e)
... {
int a = int.Parse(this.TextBox1.Text);
int b = int.Parse(this.TextBox2.Text);
int c=a+b;
System.Threading.Thread.Sleep(2000); //摸拟网络延时
this.Label1.Text = c.ToString();
}
</ script >
<
form
id
="form1"
runat
="server"
>
< div >
< atlas:ScriptManager ID ="ScriptManager1" runat ="server" EnablePartialRendering ="True" ></ atlas:ScriptManager >
< atlas:UpdateProgress ID ="UpdateProgress1" runat ="server" >
< ProgressTemplate >
< div style ="clear: none; border-right: blue thin solid; border-top: blue thin solid; display: block; left: 227px; visibility: visible; overflow: scroll; border-left: blue thin solid; width: 319px; border-bottom: blue thin solid; position: absolute; top: 103px; height: 152px; background-color: #cc9900;" >
正在计算,最稍等......... </ div >
</ ProgressTemplate >
</ atlas:UpdateProgress >
< atlas:UpdatePanel ID ="UpdatePanel1" runat ="server" >
< Triggers >
< atlas:ControlEventTrigger ControlID ="Button1" EventName ="Click" />
</ Triggers >
< ContentTemplate >
< asp:TextBox ID ="TextBox1" runat ="server" Width ="67px" ></ asp:TextBox > +
< asp:TextBox ID ="TextBox2" runat ="server" Width ="72px" ></ asp:TextBox > =
< asp:Label ID ="Label1" runat ="server" Text ="Label" ></ asp:Label > < br />
< asp:Button ID ="Button1" runat ="server" OnClick ="Button1_Click" Text ="计算" />
</ ContentTemplate >
</ atlas:UpdatePanel >
</ div >
</ form >
< div >
< atlas:ScriptManager ID ="ScriptManager1" runat ="server" EnablePartialRendering ="True" ></ atlas:ScriptManager >
< atlas:UpdateProgress ID ="UpdateProgress1" runat ="server" >
< ProgressTemplate >
< div style ="clear: none; border-right: blue thin solid; border-top: blue thin solid; display: block; left: 227px; visibility: visible; overflow: scroll; border-left: blue thin solid; width: 319px; border-bottom: blue thin solid; position: absolute; top: 103px; height: 152px; background-color: #cc9900;" >
正在计算,最稍等......... </ div >
</ ProgressTemplate >
</ atlas:UpdateProgress >
< atlas:UpdatePanel ID ="UpdatePanel1" runat ="server" >
< Triggers >
< atlas:ControlEventTrigger ControlID ="Button1" EventName ="Click" />
</ Triggers >
< ContentTemplate >
< asp:TextBox ID ="TextBox1" runat ="server" Width ="67px" ></ asp:TextBox > +
< asp:TextBox ID ="TextBox2" runat ="server" Width ="72px" ></ asp:TextBox > =
< asp:Label ID ="Label1" runat ="server" Text ="Label" ></ asp:Label > < br />
< asp:Button ID ="Button1" runat ="server" OnClick ="Button1_Click" Text ="计算" />
</ ContentTemplate >
</ atlas:UpdatePanel >
</ div >
</ form >