protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
int lbl = 0;
int txt = 0;
Label l1 = (Label)GridView1.Rows[e.RowIndex].FindControl("lbl");
TextBox tx = (TextBox)GridView1.Rows[e.RowIndex].FindControl("txt");
lbl = int.Parse(l1.Text);
txt = int.Parse(tx.Text);
if (txt > lbl)
{
ScriptManager.RegisterStartupScript(this, this.GetType(), "", "alert('value is greater')", true);
}
else
{
lbl = txt;
}
}
{
int lbl = 0;
int txt = 0;
Label l1 = (Label)GridView1.Rows[e.RowIndex].FindControl("lbl");
TextBox tx = (TextBox)GridView1.Rows[e.RowIndex].FindControl("txt");
lbl = int.Parse(l1.Text);
txt = int.Parse(tx.Text);
if (txt > lbl)
{
ScriptManager.RegisterStartupScript(this, this.GetType(), "", "alert('value is greater')", true);
}
else
{
lbl = txt;
}
}

