protected void Page_Load(object sender, EventArgs e) { int uno = 0; SqlConnection con = new SqlConnection(ConfigurationManager.AppSettings["constr"]); con.Open(); string s = "select max(uno) as uno from PayLoginHistory"; SqlDataAdapter da = new SqlDataAdapter(s, con); DataTable dt = new DataTable(); da.Fill(dt); if (dt.Rows.Count > 1) { uno = uno + 1; } if (Convert.ToString(uno) == "") { uno = uno + 1; } else { uno = uno + 1; } Session["uno"] = Convert.ToString(uno); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)