1、
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
//If it is a bound data line
if ( == )
{
if ( == || == )
{
((LinkButton)[9].Controls[0]).("onclick", "javascript:return confirm('Do you confirm that you want to delete:\"" + [1].Text + "\"?')");
}
}
}
2. <div onclick="JavaScript:return confirm('Are you sure to delete it?')">Delete</div>
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
//If it is a bound data line
if ( == )
{
if ( == || == )
{
((LinkButton)[9].Controls[0]).("onclick", "javascript:return confirm('Do you confirm that you want to delete:\"" + [1].Text + "\"?')");
}
}
}
2. <div onclick="JavaScript:return confirm('Are you sure to delete it?')">Delete</div>