Click here to Skip to main content
15,921,577 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am using VS 2012.

I am using the default asp.net web registration.


I want to get the user email address as in a textbox.

something like this

txtEmail.Text =
ASP.NET
<%: Context.User.Identity.GetUserName()  %>


What I have tried:

txtEmail.Text = <%: Context.User.Identity.GetUserName() %>
Posted
Updated 14-Mar-16 6:01am

If you're using Membership;

Membership.GetUser Method (String) (System.Web.Security)[^]

If not then you'll need to explain what you are using for authentication.
 
Share this answer
 
Thanks. That is what I was looking for:
C#
User.Identity.Name.ToString()
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900