Re: Best Approach for Membership / Profile Information
- From: "Cowboy \(Gregory A. Beamer\)" <NoSpamMgbworld@xxxxxxxxxxxxxxxxxx>
- Date: Mon, 14 Aug 2006 20:50:50 -0500
"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!
*************************************************
.
- Follow-Ups:
- References:
- Prev by Date: Re: App_Code class: Loop through controls
- Next by Date: Atlas client centric script form validaton
- Previous by thread: Best Approach for Membership / Profile Information
- Next by thread: Re: Best Approach for Membership / Profile Information
- Index(es):
Relevant Pages
|