Current user profile

S

shapper

Hi,

I want to access the profile from the current user. Shouldn't it be as
simple as:

Profile.PostalCode = "1000";

However, when I write Profile on my C# code it is not recognized. Do I
need to import any namespace?

In my Web.Config I have:

<profile defaultProvider="ProfileProvider" enabled="true">

<providers>
<clear/>
<add
applicationName="MyApp"
connectionStringName="ApplicationServices"
name="ProfileProvider"
type="System.Web.Profile.SqlProfileProvider, System.Web,
Version = 2.0.0.0, Culture = neutral, PublicKeyToken =
b03f5f7f11d50a3a"/>
</providers>

<properties>
<add name="Bio" type="MyApp.Security.Bio" serializeAs="Binary"
allowAnonymous="false" />
<add name="Visitor" type="MyApp.Security.Visitor"
serializeAs="Binary" allowAnonymous="true" />
<add name="PostalCode" />
</properties>

</profile>

Am I doing something wrong?

Thanks,
Miguel
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top