I have an MVC5 application, and in one of my view I have something like this:
<textarea id="msg" rows="5" cols="90"></textarea> <br />
@Html.ActionLink("Submit Message", "WriteMessage", new { message = msg }) <br />
The point is that, I want to get the value, meaning the text written inside my textarea
with the id
of msg
, and pass that as object routeValue during my ActionLink
. The above code doesn't seem to work. How can I achieve that?
In case you wonder, my WriteMessage
method is defined like this:
public ActionResult WriteMessage(string message)