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:

ADVANCE 2025

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