I am using Login Control available in ASP.NET 2.0 in the login page. Once the user is authenticated successfully against database, I am redirecting the user to home.aspx. Here,
As ScottS said, if you're using the standard login controls and a membership provider this information is already available to you in User.Identity.Name.
The only reason I'm posting an answer is to mention the LoginName control, which you can drop on a page/master page and have this done automatically for you:
This will render out "Welcome, Zhaph" when the user is logged in, or nothing if they are not.
You can also combine this quite nicely with the LoginView and LoginStatus controls:
Register or
Welcome back
-
This combination of controls will do the following:
The Login links is populated by the settings in web.config, and generated by the LoginStatus control.