質問

@model mymodelsnamespace

    @using (Html.BeginForm("MyMethodName", "MyContollerName", FormMethod.Post)) 
    {
         @Html.EditorFor(m => Model, "Submit", new { multiple = true }) 
        <input type="submit" value="Submit" />
    }

I know the code I am going write will be close to whats above

How do I passed the updated model into MyMethodName is i can continue to manipulate it in my controller?

Please provide the signature for MyMethodName and the cshtml to give the model to the method in the controller.

役に立ちましたか?

解決

If you add this code to your controller, it should work.

[HttpPost]
public ActionResult MyMethodName (YourModel model)
{
    ... some code here.

}

You may find the Model-View-ViewModel pattern interesting.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top