ITPub博客

首页 > Linux操作系统 > Linux操作系统 > ASPNET's useful function(1)

ASPNET's useful function(1)

原创 Linux操作系统 作者:Burgess_Liu 时间:2008-09-08 16:08:01 0 删除 编辑

1    To add attribute to a button in Page_Load:
        protected void Page_Load(object sender, EventArgs e)
        {
            btnReset.Attributes.Add("onclick", "return confirm('Are you sure delete it ?')");
        }

2    To get data from GridView when its index changed:
        protected void gvDelivery_SelectedIndexChanged(object sender, EventArgs e)
        {
                txtSoldto.Text = gvDelivery.SelectedRow.Cells[2].Text;
        }

3    To play audio file:
       Response.Write(@""); 

4   To fix Header of table:
1)  add a StyleSheet and copy below script. to it:
body {
}
.fixedheadertable{  
left: 2px;  
position:relative;  
top: 0px;  
padding-right: 2px;  
padding-left: 2px;  
padding-bottom: 2px;  
padding-top: 2px;  
}
2)   call stylesheet:
                   
                       
                       
                       
                       
                       
                       
                           
                       

                   

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/15053694/viewspace-442353/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: Upload weight
请登录后发表评论 登录
全部评论

注册时间:2008-09-05

  • 博文量
    19
  • 访问量
    13994