0

manual coding of login and logout in asp.net with c#, after that every click shows the login page...without the user login them........!

Edited by vinaysrk919: n/a

4
Contributors
3
Replies
5
Views
6 Years
Discussion Span
Last Post by idmIndia
0

Check out using session variables for recording the logged in status of a user. Each page can check the session state to see if the user is logged in or not and either redirects them to the login page or lets them view the page they are on.
As for logging in, take the user's id and password, check that against what is stored in the database and set the session variable to show logged in status if the details match.
When the user logs out simply clear the session state.
You can examples of all of this on the net or in a book

0

manual coding of login and logout in asp.net with c#, after that every click shows the login page...without the user login them........!

To code your login page manually,
>First you need to create your own controls on the login page
>code the login button to validate already registered users in your database
>it would be best you use session tracking so as to grant authenticated users access to the main page and also, when the uses logs out, it ends the current session and goes back to the defined login page

You can find the attachment useful on session tracking


as for the part of displaying the login page all the time, please make yourself clear.

Edited by Netcode: n/a

0

You can use login control of asp.net [visual studio 2005,2008,2010]. where you will find each control. example login, logout, redirect, log in status, Password recovery, change password etc. Just drag and drop that control in your page . and use them. If you don't know how to use them in your application. Just search "login control for asp.net" on Google.

Edited by Ezzaral: Snipped 'fake sig' link. Please restrict such links to your site-wide user signature, which can be edited from the user control panel.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.