Hi
Friends
i have one application in that application i login using username and password then i access all pages in my aplication then after i logout.
this is main thing
i logout then after i type url like http://localhost:2424/sample/select.aspx
it ll be display.
i need to display login page in that time(any page i type above url i want to display login page).
and also after i logout i dont want to work back and forward button.
if i logout then after i click back or forward button i need to display login page.
Loading

Ankit NandekarPosted May 4, 2011, 2:28 AM
and then check session is null or not on every page load event like
if (Session["Sessionname"] == null)
{
Response.Redirect("Login.aspx");
}
or u can use Form authentication to do this when user dont have credential it is automaticaly redirect user to login page.
Amit ChoudharyPosted May 4, 2011, 2:34 AM
If you are using RoleManager/Membership provider then here's the code that will help you. you have to set the authorization settings in your web.config.