tags:

views:

28

answers:

2

hi , i can get the user name as : User.Identity.Name , but how to get user email address because it most be stored (there is a textbox for it in the registration form)

+2  A: 
        if(User.Identity.IsAuthenticated)
        {
            someLabel.Text = Membership.GetUser().Email;
        }

u can get user - all field values from Membership.GetUser() function.

Hope this helps

Regards, J'Sinh

J Sinh
+1  A: 
protected string GetEmailAddress()
        {
            MembershipUser currUser = null;
            if (HttpContext.Current.User != null)
            {   
                currUser = Membership.GetUser(true);
                return currUser.Email; 
            }

            return currUser.Email;
        }
A_Var