Re: Best Approach for Membership / Profile Information




"jdp" <jason.pileski@xxxxxxxxxxx> wrote in message
news:1155592749.545524.225830@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I've created a custom login control with values that are not used in
the Membership table. I created these other fields through the
<profile> tag in the web config. I'm able to get a new member created
my calling membership.create user and get the other fields saved by
creating an instance of ProfileBase, calling
SetPropertyValue("property",value) mulitple times for each property,
and finally calling the Save method. My first question is: is this the
correct approach or is there a better way of creating members and
saving the corresponding data?

The "most correct" method would be inherit from the membership classes and
create the extra fields. Then, edit the ASPNET_ database tables with the
info you want. I am currently in the works on this same idea, but do not
have a working example. I will blog when I do:

http://spaces.live.com/gregorybeamer

Otherwise, your method works, even though it requires a few more trips.

Secondly, my site utilizes a master/detail scheme and when the user
logs in, I want to display their name on my master page. I created a
label on the master page and in it's Page_PreRender event, I assign the
text property the Profile.FirstName and Profile.LastName. So far, so
good. All of my detail pages inherit from a 'base' page and I have
logic in the Page_Load event to check the User.Identity.Name and if
found, display the LoginStatus control. However, since Profile is not
available here, this explains why I placed the logic in the master
page. Is this the correct approach? Is there a better way?


I am a bit confused on this one.

Assigning from profile is okay, but I am not sure about the login status
control. Is it not on the master page? If not, why not?

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think Outside the Box!
*************************************************


.



Relevant Pages

  • Best Approach for Membership / Profile Information
    ... I've created a custom login control with values that are not used in ... the Membership table. ... I want to display their name on my master page. ... However, since Profile is not ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: XP Client Cant Log In To Server After Initial Setup
    ... AddUsersToLocalAdmin-- calling NetLocalGroupAddMembers(Administrators, ... Settings\Stephanie Bellone] to the profile dir map ... CWizard::DeleteCSAllUsers-- deleting ...
    (microsoft.public.windows.server.sbs)
  • Re: Groups / Profiles and ASP.NET
    ... I have been doing some initial reading about ASPNETDB and Membership ... I would personally consider at least a custom Profile Provider, as the Profile model is problematic on many levels. ... If so, the group feature is merely a list of groups the person "joins" with an approval flag and is different from a role. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: "Unable to connect to SQL Server database" error when using profile
    ... Membership and Profile are two completely separate sections in the ... but custom profile and role providers. ... This is where I get an error: Unable to connect to SQL Server database ...
    (microsoft.public.dotnet.framework.aspnet)
  • Groups / Profiles and ASP.NET
    ... I have been doing some initial reading about ASPNETDB and Membership ... Is that is the Profile Manager more dynamic than the simple storing of ... ASP.NET membership API but not much about Groups... ...
    (microsoft.public.dotnet.framework.aspnet)