i need some advice.. I am doing a login function, which the login page (which contains session) was in aspx. After successfully login, the user will be redirected to a html page (which i want to retrieve session from the login page). After the session expires, the user will be prompt to login again. After successful login, he will be redirected back to the page where he was in just now.

I tried google it, but i can't find any matching ideas...

Can kind souls help me with it?

thank you

Recommended Answers

All 2 Replies

You dont need to do none of them manually. Asp.net covers all for these for you. Search google with "asp.net authentication and authorization"

Or if you wish to do it manually, you need to specify in your "html" page, however i has to be an aspx page to use sessions, the time the user logged in.

Set an interval in javascript to check the server for the current user's session, and whether or not it expired. If it did expire, have the javascript redirect the user to the corresponding page.

Otherwise you need postbacks to check if it has expired.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.