error when getting email of membershipuser

C

Cliff

Hi,

i try to get the emailaddress of an membershipuser:

Dim a As MembershipUser
Dim em As String
em = a.Email.ToString

In runtime, i get the error:
"Object reference not set to an instance of an object. "
(line em = a.Email.ToString)

Thanks for any suggestion
Cliff
 
S

Shaun C McDonnell

Cliff,

Try this:

Dim em as String
em = Membership.GetUser().Email

Shaun McDonnell
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top