![]() |
|
|
|||||||
![]() |
ASP Net - Add an error message to CreateUserWizard for duplicate username |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
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 |
|
|
|
|
#2 |
|
Posts: n/a
|
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 > Shane Bauer |
|
|
|
#3 |
|
Posts: n/a
|
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... ibiza |
|
|
|
#4 |
|
Junior Member
Join Date: Aug 2007
Posts: 1
|
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 |
|
|
|