MVC Pass textbox to controller if not in a form tag
- by user1679820
I am working on and Microsoft MVC3 project and cannot pass a parameter which has been edited to the controller. It will only pass back the original set parameter
For example:
@Ajax.ActionLink("share file", InviteController.Actions.Result, InviteController.Name, new { message = Model.Message }, new AjaxOptions
{
HttpMethod = "GET",
UpdateTargetId = "popup",
OnSuccess = "$('#popup').dialog('open')"
}, new { id = "popup-button" })
<label>Personal Message <span class="optional-message">(optional)</span></label>
@Html.TextAreaFor(x => x.Message)
</div>
This will pass the to the following controller but the 'message' parameter has the original message and not the updated message:
public ActionResult Result(FormCollection coll, string message)
{
I'd love if someone could give me some advice.
Many Thanks