Check Duplicate
protected bool ChkDuplicate()
{
bool noduplicate = true;
for (int i = 0; i < itemGrid.Rows.Count; i++)
{
if (itemGrid.Rows[i].Cells[2].Text == txtItem_Name.Text)
{
Response.Write("<script>alert('Exist Data!')</script>");
return false;
}
}
return noduplicate;
}
Catch Exception
catch (Exception ex)
{
Response.Write("<script>alert('" + ex.ToString() + "');</script>");
}
No comments:
Post a Comment