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/ ,如需转载,请注明出处,否则将追究法律责任。