Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2004
    Posts
    202

    Unanswered: Reload page using asp

    Hi here,

    I got this two web page which are interlink login and logout.
    When i login, i set a session to hold the name of the user. The name of the user will be display on top of the web page login.asp. After that, when i log out with the coding like this

    <html>
    <body>
    <%
    session.contents.remove("username")
    response.Redirect("index.asp")

    %>

    </body>
    </html>

    i cant seem to delete the name on the session which is display on the login page. I will be deleted when i click on the refresh.
    How come could this happen if i already change the session name to "" but when i go to the page login, the name is still there?
    Can anyone help me
    Thanks

  2. #2
    Join Date
    Mar 2003
    Location
    Atlanta, GA
    Posts
    191
    Why not just use Session.Abandon?
    Tim

  3. #3
    Join Date
    Mar 2004
    Posts
    202
    Hi sir,

    I did use session.abandon and session.contents.removeall() ...........both works but i still have to press F5 (refresh) to refresh the page so that the session at the login page will dissapear or not it will still appear with the suer name before that.
    Please help.
    Thanx

  4. #4
    Join Date
    Jun 2003
    Location
    USA
    Posts
    1,032
    Perhaps try putting something like this toward the top of your database-oriented Web pages:

    <%
    Response.Expires = -1000 ' Make browser not cache pg.
    %>
    J. Paul Schmidt, Freelance Web and Database Developer
    www.Bullschmidt.com
    Access Database Sample, Web Database Sample, ASP Design Tips

  5. #5
    Join Date
    Mar 2004
    Posts
    202
    Thank you sir.I manage to do it already.
    Thanx again

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •