Update button in datalist....
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();
}