Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

ASP Net - Add an error message to CreateUserWizard for duplicate username

 
Thread Tools Search this Thread
Old 02-14-2006, 01:36 PM   #1
Default Add an error message to CreateUserWizard for duplicate username


Hi all,

I have a CreateUserWizard with two steps, one to create the user, and
the other to associate roles to him. When I try to insert a user with a
username that already exists, I can't create the user and this is ok.
However, there is no error message of any sort, so I'd like to add a
message like 'Please enter a different user name.' How can I do this?

Thanks!
ibiza



ibiza
  Reply With Quote
Old 02-14-2006, 04:48 PM   #2
Shane Bauer
 
Posts: n/a
Default Re: Add an error message to CreateUserWizard for duplicate username

ibiza,

There is a property on the wizard called "DuplicateUserNameErrorMessage".
Set the message there.


--
Shane Bauer - MCP ASP.NET
http://www.shanebauer.com

"ibiza" <> wrote in message
news: oups.com...
> Hi all,
>
> I have a CreateUserWizard with two steps, one to create the user, and
> the other to associate roles to him. When I try to insert a user with a
> username that already exists, I can't create the user and this is ok.
> However, there is no error message of any sort, so I'd like to add a
> message like 'Please enter a different user name.' How can I do this?
>
> Thanks!
> ibiza
>



  Reply With Quote
Old 02-14-2006, 05:49 PM   #3
ibiza
 
Posts: n/a
Default Re: Add an error message to CreateUserWizard for duplicate username

Thank you, but it does not seem to change anything...it's strange

Can it be because I have set up wizard steps or something?
Because I checked the simples example on asp.net
(http://www.asp.net/QuickStart/aspnet...dBasic_vb.aspx)
and they don't even need to set the DuplicateUserNameErrorMessage
property to display an error message correctly...

  Reply With Quote
Old 08-14-2007, 04:50 PM   #4
PhantomCoder
Junior Member
 
Join Date: Aug 2007
Posts: 1
Default This worked for me

I added the messages in the page init see below it then worked for me

protected void Page_Init ( object sender , EventArgs e )
{

CreateUserWizard1.DuplicateEmailErrorMessage="That Email Address is already being used if you have forgotten your password <a href=\"PasswordRecovery.aspx\" target=\"_self\">Click Here</a> to login";
CreateUserWizard1.DuplicateUserNameErrorMessage="T hat User name is already being used if you have forgotten your password <a href=\"PasswordRecovery.aspx\" target=\"_self\">Click Here</a> to login";
CreateUserWizard1.UserNameRequiredErrorMessage="te st";
}
Cheers
Phantom
PhantomCoder is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump