16
Answers

Update button in datalist....

Gopal Ji  Singh

Gopal Ji Singh

11y
1.3k
1
i have written a query to update the table but its not updating the table please help me if some buddy can...

 protected void accept1_Click(object sender, EventArgs e)
    {
        con.Open();
       
        Label Label1 = (Label)reqlist.FindControl("Label1");
        SqlCommand cmd=new SqlCommand("update friends set friendstatus='Y' where myid='" +  Label1 + "' AND friendid='" + Session["myid1"] + "'",con);
        cmd.ExecuteNonQuery();
        Response.Write("thanx");
        con.Close();
       
    }


Answers (16)