Posted on: 10/7/2011 11:03:44 PM | Views : 271

Hi, every body. I have a problem, I´m doing a web page in ASP .NET with the language c# and i do a datagrid there with a column type button with delete so if i press that it delete the item but if i press refresh or F5, again it delete the next item and dont wanna that. how can i fix that?
thx for the atenntion.
it is the code that i have:
protected void dg_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (ds != null)
{
try
{
index = Convert.ToInt32(e.CommandArgument);
SQL = "DELETE FROM informacion WHERE ced=" + ds.Tables[0].Rows[index]["ced"].ToString();
cmd = new SqlCommand(SQL, cnn);
cmd.ExecuteNonQuery();
cmd = null;
SQL = "SELECT * FROM informacion";
da = new SqlDataAdapter(SQ ...

Go to the complete details ...