Saturday, August 11, 2018

Autogenerate ID Concept


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

Cookies login

  Match login id and password using cookies under 1 minutes if user not input valid I'd pass in 1 min then cookies expired and go to hom...