views:

183

answers:

1

Hi

I want to allow duplicate names on certain conditions(that I can check for myself).

such as

if 3 users come up to my site and have this

prefix: "jim"
userName: "chobo2"

prefix: "bob"
userName: "chobo2"

prefix: null
userName: "chobo2"

Now if someone comes in and tries to register

prefix: null
userName: "chobo2"

or

prefix: "bob"
username: "chobo2"

It should come up with a duplicate error message. If they use a new prefix with "chobo2" then it should allow them.

So I need to figure out how to turn of duplicates first. I am not sure how do this in asp.net membership. If they put something on the database tables or something or if it is built instead the Membership.Create() method.

I know I could join the prefix + userName together but I don't want to do that I want to keep them seperate.

A: 

Forget about it dude. You can't do that with default membership provider. You'll have to roll your own. You'll have an easier time combining prefix and username as the user name in the db.

Darthg8r