I have created a new ASP.NET application in VB.NET and I have made a login page that is call if the user are not logedd in and rediret to the start page.
In my internal page I have a dinamic menu that is generated by sub that check the database to the list of data.
In my page I must put a new form to make a registration of new user, but it is not possible to make two runat server form in one page, then I have insert all in the same form, but when I click on the menu start the "requiredfieldvalidator" of the form and ask me to insert the required field, but if I click on the mrnu I don't want that this happens.
Who can help me to solve this problem??

Thanks a lot for your attention.

Recommended Answers

All 4 Replies

I find this a little hard to follow/understand.

Let me see if I get this??

You have a menu system, the user selects registration page? From this menu that selection should then take the user to the registration page??

I am a little confused with this line :
"then I have insert all in the same form, but when I click on the menu start the "requiredfieldvalidator" of the form and ask me to insert the required field, but if I click on the mrnu I don't want that this happens."

What control is the requiredFieldValidator associated with?

Maybe if you provide some code, we could better help you?

A step by step sequence of events in your application would also help.

I have created a new ASP.NET application in VB.NET and I have made a login page that is call if the user are not logedd in and rediret to the start page.
In my internal page I have a dinamic menu that is generated by sub that check the database to the list of data.
In my page I must put a new form to make a registration of new user, but it is not possible to make two runat server form in one page, then I have insert all in the same form, but when I click on the menu start the "requiredfieldvalidator" of the form and ask me to insert the required field, but if I click on the mrnu I don't want that this happens.
Who can help me to solve this problem??

Thanks a lot for your attention.

OK the problema it's not easy.
I have implement your login page with authentication and validation.
In all pages I have added a menu htat are created dinamically from the database with a form and linkbutton.
In some of page I have the necessity to insert a form to update or insert the date in the database, who can I make it??
I attach the zip with the code of this page.
Thanks a lot for your help

I understand a great deal more what you are trying to do, but you have to understand that with the requiredfieldvalidator there is no way around this. If you have the form up with that control on it and then click the menu, it will fire that event. The only way around it is to do a check but another means other than the requiredfieldvalidator.

Saying that I would recommend that you use a javascript / vb script based menu system instead of trying to do the same thing with asp.net.

Sorry I couldn't give you a better solution, but I am unable to run your code, and looking through it that was the best I could come up with.

Thank you for your answer I have made a partial solution with a creation of a fame page where in the headere I create the asp.net menu and in the main I insert my registration form that work perfectly.
I know that it's not the best solution for it but I must study the asp.net command and I don't like to use javascipt. In javascript i have created many of menu dinamically but it's not my intention to do.
I must prepare for an examination at the university an ASP.NET application and I'd like to eliminate any javascipt or putting in only the necessary element of it.
I thank you more for your help. :lol: :lol:

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.