protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
int id = Int32.Parse(GridView1.SelectedRow.Cells[0].Text);
sql = "SELECT * FROM dbo.Products WHERE ProductID = '"+id+"'";
con = new SqlConnection(WebConfigurationManager.ConnectionStrings["MyConnection"].ConnectionString);
cmd = new SqlCommand(sql, con);
}