protected void GridView1_RowDataBound(object sender, GridVIEwRowEventArgs e)
{
//在服務器端添加刪除確認
if (e.Row.RowType == DataControlRowType.DataRow)
{
LinkButton btnDelete = (LinkButton)e.Row.FindControl("LinkButton1");
btnDelete.Attributes.Add("onclick", "Javascript:return " +"confirm('Are you sure you want to delete this record " +DataBinder.Eval(e.Row.DataItem, "編號") + "')");
}
}