Click here to Skip to main content
15,915,019 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i wanna develop two forms
1.) login form id="form1"
2.) registration form id="form2"
in a single aspx page

What I have tried:

i made these two forms in single page but when i clicked register button and tried to register user it gives validation to fill login form also. but showing no special error. just validating the login username textbox.
is there any solution?
Posted
Updated 28-Sep-16 3:59am
Comments
F-ES Sitecore 28-Sep-16 4:34am    
Google "asp.net validation group". What you do is add your validation controls to "groups", so your login validation controls are in one group and the register form validation in the other group. That way .net will only fire the validation in the relevant group. If you google you'll find sample code.
Suvendu Shekhar Giri 28-Sep-16 4:53am    
Perfect. My Virtual 5!
I believe, it makes a complete solution to the issue asked by OP.
Richard Deeming 28-Sep-16 9:22am    
You should post this as a solution. :)

1 solution

Google "asp.net validation group". What you do is add your validation controls to "groups", so your login validation controls are in one group and the register form validation in the other group. That way .net will only fire the validation in the relevant group. If you google you'll find sample code.

This link shows you how to set it up

Specifying Validation Groups[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900