Click here to Skip to main content
15,888,124 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello everyone,

I wanted to make a login box like one Codeproject uses. The login box is visible to visitors in all webpages of Codeproject who do not login. Once the user logins, the login box is removed and it is replaced by linkButton which shows user name and allows him to log out.

I am able to show the a different webpage to users who wish to login and once they login, their name comes up in all webpages .I achieved this by using Session (but without using MasterPage). I wish to create a login box like this site. Does the Codeproject achieves this by using a MasterPage? I tried to change the MasterPage controls dynamically, but i am unable to reflect the change in all pages of the same project.

I need some Ideas on how to start it.

I use VS2005 to do my projects.
Posted

ASP.NET has built in Login controls that pretty much does what you are trying to do. Don't re-invent the wheel unless it is a better wheel.
 
Share this answer
 
Comments
Praveen Kullu 4-Aug-11 5:40am    
I am using the built in Login control in another aspx page. But it feels like old school method. The method used by Codeproject to login users is new for me.
BobJanova 4-Aug-11 7:15am    
You can customise the HTML which is shown in logged out and logged in states, so you can make one which can be run inline in a page header like the CP one.
[no name] 4-Aug-11 7:37am    
If you are only worried about the "looks", then every aspect of the Login controls can be customized. Check this link for more information: http://msdn.microsoft.com/en-us/library/ms178329.aspx
Praveen Kullu 4-Aug-11 10:21am    
@Shameel That was helpful, thank you for the link. I can customize the Login control also to look as i want.
As Shameel says this already exists - check out msdn[^] on how to use the login controls.
 
Share this answer
 
Comments
Praveen Kullu 4-Aug-11 5:55am    
I am already using built in login controls in my project which has a separate aspx page dedicated to it. My wish is to create one like this site.
Thank you to all who tried to help me. I have finally figured it out. I used Session variable and MasterPage load event to solve the problem. If someone else wants to know how i did it, then ask me and i would be happy to tell.
 
Share this answer
 
v2

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