The HttpContext.Current.User.Identity.Name will return the value that has
been set for the name field. Howevery, this is often just an ID number or
something else. You can create your own identity class based on the
IIdentity interface. You can also generate a custom ticket to pass with the
forms authentication. This has the benefit of having custom data stored in a
custom data field for the ticket that could be used to store the user's
name.
Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage
"Paul W" <qq*@qqq.com> wrote in message
news:ee**************@TK2MSFTNGP14.phx.gbl...
I've got Forms Authentication up and running. The starting page for the
app. is default.aspx. I want to display on the top of this form a 'You are
logged in as Fredxyz' message.
If the user is a return user and was automatically logged in by a
persistent auth. cookie, how can I find out the 'username' that he's
logged in as?
Thanks,
Paul.