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

ADVANCE 2025

 HTML TABLE SCROLL BAR  <style>      .table-container {             width: 100%;             overflow-x: auto; /* Enables horizontal s...