Dim userProfile As ProfileCommon = Profile.GetProfile(username)
>
Now I moved the code line to a new class under App_Code and I am
getting the error:
'GetProfile' is not a member of Profile.
Profile is available at two levels:
1. HttpContext::Profile is of type System.Web.Profile.ProfileBase
2. YourCustomPage::Profile is of type ProfileCommon
The class ProfileCommon is defined nowhere in standard .Net Library.
If you want to use the new GetProfile available in ProfileCommon, do
something like this:
Dim userProfile As ProfileCommon = (ProfileCommon)
ProfileBase.Create(username, isAuthenticated)
since you would be always working with authenticated user, pass True to the
second paramter or use the overloaded method that takes only one paramter,
the username.
Look into the documentation of this method for more details...
HTH.
--
Happy Hacking,
Gaurav Vaish |
www.mastergaurav.com www.edujini-labs.com http://eduzine.edujinionline.com
-----------------------------------------