Login/ Logout
for administrator. How do i set the login first for 2,3,4 aspx if the
administrator have yet to login?
Next there's a problem with logout, how do i bring the user to another page when logout is click and disable the back button?
for administrator. How do i set the login first for 2,3,4 aspx if the
administrator have yet to login?
Next there's a problem with logout, how do i bring the user to another page when logout is click and disable the back button?
you can redirect the user to another page if they logout:
Response.Redirect("somepage.aspx")
as for logging in, I guess if page 1 was the login page, you would check with say, SQL, if the user exists and is an admin, and if they are then to store an object or something in session (Session.Add("key", object)), which will hold the details of the user for example or perhaps some value to indicate they are the administrator.
Once this has been done on the login page, as for the rest of the pages for it to only be seen by the administrator, on page_load, make sure you do a check on the Session. The check should check that the key added/object added is a valid and an object which indicates that the user logged in is in fact an administrator, if not, then redirect them somewhere else or hide the controls on the page.
hope this helps!
well how exactly are you going to check to see if the user exists in the database? the database holds all the user credential details (or it should at least)
I guess you could use the loginview class although I've never used it:
http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.loginview.aspx
I have not used it but now since this thread is really the focus of ASP.NET, I would have to advice you to post it over on:
as the entire site is dedicated to ASP.NET and someone will have a better and quicker response than here regarding ASP.NET queries :-)
in that case I really don't know im afraid, im sure someone else will or again wait for a reply over on forums.asp.net
take a look at this and see if it helps, otherwise im out of ideas apart from using the way I usually use to authenticate users :-)