Id like to know how to display a logged in users name on a aspx webpage?

The website is a music online store that can be view without logging into the site. If the user however wants to purchase a music album and they are not registerd to my site, then the have to register to our site. Then there after once they login to the site, it must display the users name on each page once the have logged in.
Thanks guys

6 Years
Discussion Span
Last Post by JorgeM
                <asp:LoginView ID="HeadLoginView" runat="server" EnableViewState="false">
                        [ <a href="~/Login.aspx" ID="HeadLoginStatus" runat="server">Log In</a> ]
                        Welcome <span class="bold"><asp:LoginName ID="HeadLoginName" runat="server" /></span>!
                        [ <asp:LoginStatus ID="HeadLoginStatus" runat="server" LogoutAction="Redirect" LogoutText="Log Out" LogoutPageUrl="~/"/> ]


If you use visual studio, just create a new web app project. In the project, you'll find that it creates a sample web application that includes all of the login examples. The code that vsmash provided looks like it came from that example web application.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.