I have a javascript method onRowSelected wchich gets rowid. How to pass the rowid in certain action of a controller with HttpGet?
f
The method by Darin will work fine and perfectly.
I would suggest one more way for Razor view to use model value using @Html.actionlink in jsp
var URLvalue='@Html.ActionLink("UserString", "action", new { routeValueName1 = "__value1__", routeValueName2="__value2__" }, htmlAttributes: new { @class = "btn btn-default", @role = "button" })'
.replace('__value1__', Model.somevalue).replace('__value2__', Model.somevalue);
you can use URLvalue where ever you want to in jsp or jquery.