I am trying to use Html.ActionLink
to generate URL with query String parameter at the end of it like:
Controller/Action?id=5
But what i get is:
Controller/Action/5
Using :
@Html.ActionLink((string)ViewBag.Back, "Action", "Controller", new{id = Model.Id }, new { })
How can i pass the id parameter as "?id=" not after "/" Thanks
change action header
public ActionResult Details(int? detailsId)
and adjust link
Html.ActionLink((string)ViewBag.Back, "Action", "Controller", new{detailsId = Model.Id }, new { })