I am new to C# and not sure if I’m asking this correctly. I need to return the current logged in user of my app as a string.
System.Web.UI.WebControls.LoginName
I am using the Visual Studio 2010 ASP.NET Web Site template.
Response.Write(System.Web.UI.WebControls.LoginName);
Will not work because it is not of the right “type”. How do I get this value as text?
System.Web.UI.WebControls.LoginNameis a control.The data item is
Page.User.Identity.Name