ASP .Net 2.0 Profile property

G

Guest

Does not appear to be available in page base classes. I was intending to
create a page base class to set the culture based on the profile setting, but
the profile property does not apear to be available. I can work around it by
looking up a user, but this doesn't help with anonymous settings.

Does anyone know a way around this? I am using the release candidate.
 
S

Scott Allen

That sounds right - the Profile property is defined in a partial class
and code-generated when the web form compiles.

You can also get to the profile with HttpContext.Current.Profile.
You'll have to use loose typing, though (profile["MyProperty"] instead
of profile.MyProperty).
 

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,011
Latest member
AjaUqq1950

Latest Threads

Top