473,387 Members | 1,890 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to Expire a Webpage (VB.Net)

Hi all, I'm studying creating webpages in VB.Net. After a successful Logon, I want that page to expire or simple disallow users to 'go back' to that page (not necessarily disable the back button). I have created webpages under the Master Page.

Thanks in advance,
Josh
Aug 1 '11 #1
6 2549
yarbrough40
320 100+
What method of "Log In" are you using?
What Logoff method(s) have you attempted so far?
Aug 2 '11 #2
Hi yarbrough40,
Login Method? Do you mean how do I connect to my database? I have an SQL db where the user profiles are stored. I use sql connection string (and sql data adapter) to check if users exist.

Log-off Method. I simply redirect them to my login page. My problem is that previous pages can still be navigated through even when the users are supposedly logged off the system :-(

I am a newbie in web development, so any help would be appreciated :-)
Aug 8 '11 #3
yarbrough40 I also have this procedure:

[code]
Protected Sub imgLogOff_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles imgLogOff.Click

Session.Clear()
Session.Abandon()

End Sub

[\CODE]
Aug 8 '11 #4
I think yarbough40 means how are you getting the user to logon rather than how you check the SQL ;)

For not needing to return, you could just see if a session variable has been set on the login page. If it's set, return to the page you've just come from. You need to put it in the Page_Load routine (from memory - it's been a while since I've done this)

Session.Abandon() destroys the session and causes Session_OnEnd to be triggered

Session.Clear() clears the session object, but the session with the same key is still alive. In otherwords, if you want the user to not need to relogin, you use this.

In this case, Session.Clear() is not needed
Aug 9 '11 #5
Hi Paul, I tried using Session.Abandon() but still users can navigate through the pages.
Aug 15 '11 #6
Quite possibly they have a copy in their cache...

I would set a cookie which is deleted on Session.Abandon(). If it's there they can look around. If it's not they get redirected to the login (you may have to include it on the Page_Load routine for each page though - just call a common method)
Aug 15 '11 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Angelos | last post by:
Hello there... I would like to know how to set the session timeout time locally and not globally in the php.ini file. I do that as it is ine www.php.net but doesn't seem to do anything...
3
by: Joey Powell | last post by:
This message was originally posted to the aspnet.security newsgroup, but no one there has ever heard of this before. That is why I am posting this message here, so that more people will see it... ...
2
by: Dicky Cheng | last post by:
Hi, I am using absolute expiration to expire my cache object in Cache API. And I set it to expire after 60min. Then I test it, it cache, and everything fine. Then I stop working and lock...
2
by: karunakar | last post by:
Hi All I dont want to expire the applicatoion Once login the application i dont want to expire the application Presently iam doing using cookies this is not working fine Please help me out ...
6
by: Mustufa Baig | last post by:
Hi, I don't want to show the web page name shown in the address bar. For example if the website address is http://localhost/webreadfile/ so from this point forward, no matter which pages I surf,...
23
by: Phil Powell | last post by:
// OBTAINED FROM http://www.javascripter.net/faq/settinga.htm // NOTE THAT IF YOU SET days TO -1 THE COOKIE WILL BE SET TO YESTERDAY AND THUS EXPIRE function setCookie(name, value, days, docObj)...
11
by: EagleRed | last post by:
I am writing an ASP.NET 2.0 application that uses master pages. I have some pages that must not be cached on the client. In ASP.NET 1.1 I achieved this using metatags: <meta...
4
by: orware | last post by:
Hi! This is my first post...and when I begin working on this project, it will also be my first PHP project! I do have some programming experience from my first year at college, but that was in Scheme...
0
by: aspineux | last post by:
setacl and getacl look to be already "Cyrus" specific (according the doc), why not to extend imaplib a little bit more ? Here are some code I wrote and tested to support cyrus "expire" that...
1
by: Ananthu | last post by:
Hi I have designed a website in ASP.NET and if i leave any webpage for 2 or 3 minutes idle, the pages automatically expire. I am not able to open those pages in the brower without clearing the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.