multiple forms on one view in mvc

I'm using ASP.NET MVC 5, C#, Razor.

I have a view where i want to have 3 forms.


In each of those sections I would have some drop down lists and textboxes to collect the data.

So far I have only tried it using 1 form in my view and my page works fine.

But I was thinking of having 3 forms on the same view.
See I'm going to have each form in a div and I'm going to have some buttons control their visibility.  
So if i click button one the div holding form 1 is going to become unhidden while the other to are hidden and so on.

I'm new to mvc.
Before I tried doing it with my 3 forms all in the same view, I wanted to know if this is possible.

So the sections of my three forms would look something like the code below.
Is it possible to have 3 forms like the code shown below on one view?



@using(Html.BeginForm("Form1", "MyController", FormMethod.Post))
{

<input type="text" id="Form1LastName" />
<input type="text" id="Form1FirstName" />

   <input type="submit" name="Form1button" value="Create" />
}


@using(Html.BeginForm("Form2", "MyController", FormMethod.Post))
{

<input type="text" id="Form2LastName" />
<input type="text" id="Form2FirstName" />

   <input type="submit" name="Form2button" value="Create" />
}

@using(Html.BeginForm("Form3", "MyController", FormMethod.Post))
{


<input type="text" id="Form3LastName" />
<input type="text" id="Form3FirstName" />

   <input type="submit" name="Form3button" value="Create" />
}
LVL 1
maqskywalkerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Randy DownsOWNERCommented:
Maybe this will help.

In a MVC view, you can have as many forms with as many fields as you need. To keep it simple, use a single view model with all the properties you need on the page for every form. Keep in mind that you will only have access to the form field data from the form that you submit. So, if you have a login form and registration form on the same page you would do it like this:
1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.