Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

forms authentication, log out button

Posted on 2006-11-07
5
Medium Priority
?
535 Views
Last Modified: 2009-12-16
Hello,
I am using ASP.NET 1.1 and just tried my hand at forms authentication.  I want the 'logo' image, the 'Log out' button, and the Label having text as ("Hello " + User.Identity.Name")  to appear on every page once the user is logged in.  I don't know what's the best way to achieve this.

I created one page with just these three controls and showed this page as a frame at the top once the user has logged in. But I don't want this top frame to appear when the user is not logged in and the 'login.aspx' page should appear in the whole window then.

If a page other than the login.aspx page is requested after the logout, the control goes to the login page as desired. But the problem is since any other window (except the one having login.aspx page) contains two frames, two login.aspx pages are opened, one in each frame. How do I redirect a request to any window(which is containing two frames = two aspx pages) after logout to just one whole frame containing the login.aspx page?

or is there a better solution than using frames?
Please help. Thank you.
0
Comment
Question by:engg
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 12

Accepted Solution

by:
sandip132 earned 1500 total points
ID: 17895111
You have "usercontrol" as a best option.... Just add youe logo , button and label in a usercontrol. and just include it in your webpages.

http://www.codersource.net/asp_net_user_controls_azam.aspx
http://www.c-sharpcorner.com/Security/LoginUserControl.asp
0
 

Author Comment

by:engg
ID: 17895414
Thanks Sandip.
I thought frames would be an easier option than creating a panel on every page and adding the user control to the panel. Please correct me if I am wrong.

Could this problem be solved if I continue to use frames? or is there any other way?
Thanks.
0
 
LVL 12

Expert Comment

by:sandip132
ID: 17896073
I am not talking about Panel. I am refering to use user-control. Please visit the links, so that you will get better idea.  For your requirement User control is a very good option.
0
 

Author Comment

by:engg
ID: 17902884
Ok. Thanks Sandip. If I want to position the user control on a web form, I will need to add a placeholder (like a panel) to every web form and then add a user control to the placeholder, right?
0
 
LVL 12

Expert Comment

by:sandip132
ID: 17911235
Not required.... you can just drag n drop and use like any other web control.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question