Web Site / Variables

G

Guest

I'm making a Web Site with Visual Basic .Net and i need the user to log on in
order to have access to some pages on the web site. How can i maintain the
username and password variables from the login page allways availlable to the
other pages in order to determine the access level, that the user has, for
each page?
(Maybe there's another technique that i don't know without using variables)

My thanks in advanced
 
B

Bob Powell [MVP]

The Session object is usually used for this purpose.

You can do the login and set Session("loggedin")=true

The key "loggedin" will persist across pages and will be available to the
rest of your application.

When the user logs out you can do Session.Abandon to clear any information
that might be hanging about associated with that client session.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
 

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

Top