Click here to Skip to main content
15,896,526 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i want to design masterpage and one webform with importing masterpage ,in webform i wrote one login code when i login successfully, i want to show logout button in masterpage design..how it will do..if i don't login hide the logout button, it will applicable to all user logins...

if you have any idea please share me...this is my requirement... i want to good and acceptable code only
Posted
Updated 29-Dec-14 15:35pm
v2

Keep the logout button hidden by default.
If a user logs in, show the logout button.
 
Share this answer
 
Hi, you don't need to do this manually, your tactics might not be that good compared to the feature provided by asp.net.

There is a built-in user management system in .net which handles user reg, login and more.

Look in you LOGIN section of your toolbox, there is a LoginView, LoginName, LoginStatus and so on wich will help.

Learn more here http://asp.net/web-forms/videos/authentication

You can do more search in CodeProject for "Asp.net Authentication"
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900