The FormsAuthenticationModule class detects the forms authentication cookie and authenticates the user. After successful authentication, the FormsAuthenticationModule class populates the current User property, which is exposed by the HttpContext object, with information about the authenticated user.
Forms Authentication in ASP.NET[
^]
HttpContext.Current.User.Identity.Name
gives the user name after successful authentication.