How to validate a user using form based authentication against database

Posted by Arunkumar_1492 under ASP.NET on 4/10/2013 | Points: 10 | Views : 1304 | Status : [Member] | Replies : 1
i have a database where username and password are stored and i want validate users on login page of application and whenever user tries to access some another page except login then he redirect to login page ....................




please help me
it's urgent

thanx




Responses

Posted by: Ankitsrist on: 4/10/2013 [Member] Starter | Points: 25

Up
0
Down
hello,
try this
if(Session["login"]==null)
{
Response.Redirect("login.aspx");
}
else
{
Label1.Text=Session["login"].ToString();
}

Arunkumar_1492, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response