0

I'm trying to get the input from all the HTML objects I used in the view to run some other functions with those inputs.

I need to get the input from

  • A textbox
  • 3 selects (comboboxes)

This is what I do on button click:

Controll (Controller is called "SetupController"):

        public ActionResult Install()
        {
            return View("Index"); //This is my home-page
        }

HTML:

@Html.ActionLink("Start Setup!", "Install", "Setup")

So how do I get information out of those inputs?

The selects are called "folder", "database" and "sbnProject".

Thanks in advance, Thomas

1 Answer 1

1

I found out how to fix it (after a while of trying):

    // GET: Configuration
    public ActionResult Install(String projectName, FormCollection selectLists)
    {

        var var1 = selectLists["svnProject"];
        var var2 = selectLists["database"];
        var var3 = selectLists["folder"];

        return View("Index");

    }

Have fun with the answer!

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.