In ASP.NET in form page the object which contains the user name is ______ ?
-
Page.User.Identity
-
Page.User.IsInRole
-
Page.User.Name
-
None of the Above
A
Correct answer
Explanation
Page.User.Identity is correct because it provides the identity information of the authenticated user, including the username. Page.User.IsInRole (B) checks role membership but doesn't return the name, and Page.User.Name (C) is not a valid property. The Identity object contains the Name property that holds the username.