Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9317569
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T02:54:29+00:00 2026-06-19T02:54:29+00:00

I have a page that contains a form (below): @using (Html.BeginForm(GetResults, Process)) { @Html.ValidationSummary(true)

  • 0

I have a page that contains a form (below):

@using (Html.BeginForm("GetResults", "Process"))
{
@Html.ValidationSummary(true)
{
<div data-role="fieldcontain">
    <label for="name">API #1:</label><br />
    @Html.EditorFor(model => model.Active1.mg)
    @Html.ValidationMessageFor(model => model.Active1.mg)
</div>
<div data-role="fieldcontain">
    <label for="name">API #2:</label><br />
    @Html.EditorFor(model => model.Active2.mg)
    @Html.ValidationMessageFor(model => model.Active2.mg)
</div>
<div data-role="fieldcontain">
    <label for="name">API #3:</label><br />
    @Html.EditorFor(model => model.Active3.mg)
    @Html.ValidationMessageFor(model => model.Active3.mg)
</div>
<div data-role="fieldcontain">
    <label for="name">API #4:</label><br />
    @Html.EditorFor(model => model.Active4.mg)
    @Html.ValidationMessageFor(model => model.Active4.mg)
</div>
<div data-role="fieldcontain">
    <label for="name">API #5:</label><br />
    @Html.EditorFor(model => model.Active5.mg)
    @Html.ValidationMessageFor(model => model.Active5.mg)
</div>
<div data-role="fieldcontain">
    <label for="name">Key Active:</label><br />
    @Html.EditorFor(model => model.KeyActive.mg)
    @Html.ValidationMessageFor(model => model.KeyActive.mg)
</div>
<div data-role="fieldcontain">
    <label for="name">Key Active Pack Stat:</label><br />
    @Html.EditorFor(model => model.KeyActive.key_active_pack_stat)
    @Html.ValidationMessageFor(model => model.KeyActive.key_active_pack_stat)
</div>
<div data-role="fieldcontain">
    <label for="lble4m">E4M: </label>
    <br />
    @Html.DropDownList("ddle4m", new[] { new SelectListItem() { Text = "Off", Value = "False" }, new SelectListItem() { Text = "On", Value = "True" } }, new { data_role = "slider" })
</div>
<div data-role="fieldcontain">
    <label for="lblk100m">K100M: </label>
    <br />
    @Html.DropDownList("ddlk100m", new[] { new SelectListItem() { Text = "Off", Value = "False" }, new SelectListItem() { Text = "On", Value = "True" } }, new { data_role = "slider" })
</div>
<div data-role="fieldcontain">
    <label>Choose Filler:</label><br />
    <fieldset data-role="controlgroup">
        @foreach (var i in Model.Fillers)
        {
            <input type="radio" name="radio-choice" id="@i.pk" />
            <label for="@i.pk">@i.name</label>
        }
    </fieldset>
</div>

<p>
    <input type="submit" value="Create" />
</p>
}
}

As you can see, this form is tied to the “GetResults” action method inside of the “Process” controller. So consequently, when the user clicks “Submit”, the object that is passed SHOULD be the object defined in the form, right?

Here’s my “GetResults” action method:

public ActionResult GetResults(ProcessViewModel vm)
    {
        vm.NumberOfCapsules = 100;

        List<Results> results = context.GetResults();
        return View(results);
    }

Is passing my ViewModel into my controller a good practice, and if not, how would I capture all of the data from the form?

Thanks..!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-19T02:54:31+00:00Added an answer on June 19, 2026 at 2:54 am

    You sure posted a lot of code there. And then you ask a question. The answer to that question is: YES.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a page that contains an HTML form that submits back to itself
I have a page on a website that contains a secure form inside an
I have an HTML page that contains some filenames that i want to download
I have an ASP.Net page that contains a <div> with an <img> tag within.
I have an ASP.NET page that contains two div's. Both have search fields and
i have a html page, which contains a form and i want when the
I'm looking at creating a very simple HTML page that contains an HTML form
I am making a chrome extension and I have a popup.html page that contains
I have a page that has a form backing object that contains a collections
I have Results page that contains an signup form. I'm trying to use client-side

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.