Reputation: 10561
I am using the built-in asp.net membership framework. I created a registration page and set up client-side validation with some custom validators, validating through jQuery AJAX to a web service and the client-side validation works ok. I have two issues:
Even when the client-side validation fails, the continue button still works. How do I disable it?
I don't want to count on client-side validation. How do I go about implementing server-side validation in the CreateUserWizard? Can you point me at some specific tutorial? I failed to find one.
Thank you!
Upvotes: 2
Views: 1715
Reputation: 1371
Please look on the following tutorials for full information about the CreateUserWizard: Customizing the CreateUserWizard Control.
Another helpful tutorial can be found here: Customizing ASP.NET's CreateUserWizard Control To Display a Fixed Set of Security Questions
Upvotes: 1
Reputation: 100258
Use event CreatingUser
.
Markup:
<asp:CreateUserWizard runat="server" CreatingUser="wizard_CreatingUser" />
Code:
protected void wizard_CreatingUser (object sender, LoginCancelEventArgs e)
{
e.Cancel = ((CreateUserWizard)sender).UserName.Contains("!@#$%^&");
}
Upvotes: 3