i want to create a session so that i can catch userId and Branch Code and store that into a another table, when an update is done,
here is my code for class file
public void UserSessionData(string UserId,String Branch)
{
HttpContext.Current.Session["UserId"] = UserId;
HttpContext.Current.Session["Branch"]= Branch;
}
protected void btnLogin_Click(object sender, EventArgs e)
{
Main main = new Main();
var parameters = new SqlParameter[] {
new SqlParameter("@UserId", txtUname.Text),
new SqlParameter("@pwd", main.Hash(txtPassword.Text))
};
main.StoredProcedureName = Main.StoredProcedure.Login.ToString();
main.Parameters = parameters;
var dt = main.ExecuteSP();
if (dt.Rows.Count > 0)
{
...
Go to the complete details ...