hi all,
How to make the log out control where we use the " authentication mode="Forms" " in web.config file. I used the session management as well.
in web.config file :-
<authentication mode="Forms">
<forms name="RCSI" defaultUrl="~/User/MyHomePage.aspx" loginUrl="~/Common/Login.aspx" >
</forms>
</authentication>
in login file:- protected void btnSubmit_Click(object sender, EventArgs e)
{
SqlDataReader dr;
dr = obl.drrr("exec usp_login3 '" + txtUsername.Text + "','" + txtPassword.Text + "','" + true + "'");
if (dr.Read())
{
Session["username"] = txtUsername.Text;
FormsAuthentication.RedirectFromLoginPage(txtUsername.Text, true);
Response.Write(Session["username"].ToString());
}
else
{
lblMsg.Text = "Incorrect password or not verified";
lblMsg.Visible = true;
Panel2.Visible = true;
}
}