J
jdp
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?
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?
Any feedback is greatly appreciated!
Thanks in advance.
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?
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?
Any feedback is greatly appreciated!
Thanks in advance.