Hello this is my web.config
<system.web>
<authentication mode="Forms">
<forms name="NovinCook" loginUrl="~/CP/Login.aspx" protection="All" defaultUrl="Default.aspx" timeout="2880" />
</authentication>
</system.web>
<location path="cp">
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>
this is for secure Cp Directory
but when i insert username and password in login page i'm in login page and don't redirect to from login page and this is mr code in login page:
protected void Button1_Click(object sender, EventArgs e)
{
var user = (from u in db.tblUsers
where u.Password == TextBox2.Text
select u).FirstOrDefault();
...
Go to the complete details ...