SqlParameter[] paramater = new SqlParameter[] { new SqlParameter("@User_Name",Login1.UserName), new SqlParameter("@Password",Login1.Password) }; SqlDataReader dr = (SqlDataReader)db.ExecuteReader("Login", paramater); if (dr.HasRows) { dr.Read(); Session["Branch"] = dr["Branch"].ToString(); Session["user"] = dr["Id"].ToString(); dr.Close(); DropDownList ddyear = (DropDownList)Login1.FindControl("ddyear"); Session["year"] = ddyear.SelectedItem.Text; FormsAuthentication.RedirectFromLoginPage(Login1.UserName, Login1.RememberMeSet); }
<authentication mode="Forms"> <forms defaultUrl="Home.aspx" loginUrl="LogIn.aspx" timeout="60"></forms> </authentication>
<authentication mode="Forms"> <forms defaultUrl="~/Home.aspx" loginUrl="~/LogIn.aspx" timeout="2000"></forms> </authentication>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)