[Atlas]一个Atlas实现的简单例子

< 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 >
 
< 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 > &nbsp; < br  />
                
< asp:Button  ID ="Button1"  runat ="server"  OnClick ="Button1_Click"  Text ="计算"   />
            
</ ContentTemplate >
            
        
</ atlas:UpdatePanel >
        
        
</ div >
    
</ form >
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值