What is the difference when retrieving username for the view?
<%= Page.User.Identity.Name %>
or
<%= Membership.GetUser().UserName %>
According to the documentation, GetUser
gets the information from the data source and updates the last-activity date/time stamp for the current logged-on membership user.
Page.User.Identity.Name
does not do that. It reads information that is readily available in memory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With