What is the difference when retrieving username for the view?
<%= Page.User.Identity.Name %>
or
<%= Membership.GetUser().UserName %>
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
According to the documentation,
GetUsergets the information from the data source and updates the last-activity date/time stamp for the current logged-on membership user.Page.User.Identity.Namedoes not do that. It reads information that is readily available in memory.