createuserwizard control - adding additional fields

V

vtxr1300

I am working with one of the .net starter kits and it uses the
createuserwizard control. That's fine, but it doesn't include a field
for first and last name. On another thread on asp.net, they suggested
using the profile in the web.config to create firstname and lastname
properties and then have the profile save when a user registers. That
works fine, but what I'm trying to do is replace all the instances in
the app of the username with the firstname and lastname.
Unfortunately, the profile info is stored with all the values concatted
together and no easy way to split it apart (at least in a query
anyway). The only way I've found (I think, haven't actually tried it
yet) to do this is to call the ProfileManager's
ProfileManager.FindProfilesByUserName to get the settings for each item
I databind to a dropdownlist. But, I would imagine that the
FindProfilesByUserName hits the database, so if I have 10 people being
added to 1 dropdown, that's 10 separate hits for that one dropdownlist,
right? Anyone know of another, easier or more efficient way to do
this? Thanks.
 
G

Guest

Hello vtxr1300,

I would think you could customize (template) the CreateUserWizard control to
require the input of both the first and last name. Then you could append them
together with a (space between them) and make the call to the
membership.CreateUser() method yourself. It means you have to do a bit more
coding, but then you could use the LoginName control without having to go to
the profile api. You leave all the membership tables entact and the username
would just show up as the first and last name.
 

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,777
Messages
2,569,604
Members
45,206
Latest member
SybilSchil

Latest Threads

Top