Button Click Event
public void
AutogenId()
{
Int32 ap =
5001;
try
{
cm = new
SqlCommand("Select max(roll)+1 from Table1", cn);
ap =
(Int32)cm.ExecuteScalar();
Label1.Text = ap.ToString();
}
catch
(Exception)
{
Label1.Text = ap.ToString();
}
No comments:
Post a Comment