Wednesday, December 26, 2018

Autogenerate ID

using System.Configuration;
using System.Data;
using System.IO;


protected void generatedStudID()
    {
        con.Open();

        cmd = new SqlCommand("select MAX(Sr_No) from  TABLENAME", con);

   
        int i = Convert.ToInt32(cmd.ExecuteScalar());
        con.Close();
        i++;
        strID = ID + Year + z + i.ToString();


    }

1 comment:

GRIDVIEW ON ROW DATA BOUND EVENT

 Database Create  Student : roll , name , city , cost  Fix 6 Value  in Database Record  ====================================================...