Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old July 19th, 2004, 04:01 AM
Authorized User
Join Date: Jul 2004
Posts: 68
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to aravwind Send a message via Yahoo to aravwind
Default log out problem in ASP.net

In my webpage, when i press "logout" button, i
abandon the session and redirecting to the login.aspx page
but when i press the back button in the IE, the previous
page is displayed which i need to be stopped.
what shall i do? i want the same login.aspx page should be displayed when the user press the back button after logout.
any way the users cannot click anything as i abandoned the session.

Faster and consistent will surely beat the slow and steady
Old July 19th, 2004, 09:07 AM
Friend of Wrox
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts

What authentication type are you using?

Old July 19th, 2004, 09:16 AM
Authorized User
Join Date: Jul 2004
Posts: 68
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to aravwind Send a message via Yahoo to aravwind

this is my code for logout.

<a class="nav" href="login.aspx?mode=1">Sign out</a><br>

If Request.QueryString("mode") = 1 Then
        End If

For login this is my code,

goQuery = "select * from forumlogin where psUsrName = '" & txtUser.Text & "' and pswd = '" & txtPassword.Text & "'"
        cmd.CommandText = goQuery
        dr = cmd.ExecuteReader()
        txtHdnDisplay.Visible = True
        If dr.Read Then
            Session("user") = txtUser.Text
            If IsDBNull(dr.Item("psAdmin")) Then
                Session("flag") = 0
                Session("flag") = dr.Item("psAdmin")
            End If
            Session("blnLogin") = "True"

            txtHdnDisplay.Text = "Enter a valid user id and password"
            txtUser.Text = ""
            txtPassword.Text = ""
        End If

Old July 19th, 2004, 09:23 AM
planoie's Avatar
Friend of Wrox
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts

You'll need to set your pages to expire immediately so that even hitting the back button will force the browser to reload the page, thus re-testing for the login state.

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create an Exceptional Log in asp.net Baby_programmer ASP.NET 1.0 and 1.1 Professional 1 June 7th, 2005 12:29 PM
AppException Class -Log Error to Event Log bekim BOOK: ASP.NET Website Programming Problem-Design-Solution 7 December 7th, 2004 01:01 PM
crystal report with asp.net log-on fail exception avinash sharma LNCT Crystal Reports 0 December 6th, 2004 01:42 AM
ASP.NET C# Writing to Event Log Problem wireblock ASP.NET 1.0 and 1.1 Basics 1 July 26th, 2003 04:08 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.