Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB 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 December 16th, 2012, 05:09 PM
Registered User
 
Join Date: Nov 2012
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Login controls issue

I'm having a problem with the login controls that were used to create the basic website for beginners asp.net in C#. I've created multiple pages with role profile security, Each displaying the user name at the bottom of the page as in the example website. My issue is that different pages are showing different users. For example, i log in as user1 on page1, log out as user1 on page 2 and then login in as user 2 on page 2. Page 2 displays user2 as being the logged in user, but when i navigate to back 1, it again shows user1 logged in, along with user1's security right. I'm assuming it has something to do with the cache. Is there a way to make sure that pages recognize that the user has logged out?
 
Old December 17th, 2012, 08:14 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

You can use the SetCacheability method as explained here: http://codeclimber.net.nz/archive/20...ty-method.aspx

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Login Controls esherr01 BOOK: Beginning ASP.NET 4 : in C# and VB 18 July 15th, 2011 11:56 AM
Login Controls DragonLEG BOOK: Beginning ASP.NET 4 : in C# and VB 10 June 8th, 2011 03:29 PM
Using basic login controls jgtech BOOK: Beginning ASP.NET 4 : in C# and VB 3 October 28th, 2010 02:38 AM
The Login Controls HovhannesGo BOOK: Beginning ASP.NET 4 : in C# and VB 3 September 17th, 2010 07:59 AM
Login Controls mashype ASP.NET 3.5 Basics 4 January 26th, 2009 03:07 PM





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