Problem is session....

S

sri

I have login page "Login.aspx" and when user logs in the session.item("userid")=userid and navigates to next page inbox "Inbox.aspx" and when i logoff from this page i make the session.item("userid")="", Redirect to Login page. the problem is when i copy the inbox url i.e "inbox.aspx" and when i logoff and paste the url in the browser then again it is showing the "inbox.aspx".. so how can i restrict when the url is pasted in the browser and when we press enter it should redirect to login.aspx.

From http://www.developmentnow.com/g/8_2005_7_22_0_0/dotnet-framework-aspnet.ht

Posted via DevelopmentNow.com Group
http://www.developmentnow.com
 
S

S. Justin Gengo

sri,

Just check for the user id on every load of the inbox.aspx page. If it isn't
there redirect to the login page.


If CType(session.Item("userid"), Int32) = 0 Then
Response.Redirect("login.aspx")
End If

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top