Reputation: 169
I need Razor @Html.ActionLink to pass data from one page to another. The Action link is like:
@Html.ActionLink("Add to Plan","Index","Plan", null, new {@id="submit", @name="submit", @class="slider-btn"})
I have a value like this:
<input type="hidden" id="searchbar" name="searchbar" value="some_value" />
Upvotes: 1
Views: 616
Reputation: 169
Should use this...
@Html.ActionLink("Add to Plan","Index","Plan", new { searchbar = "some_value" }, new { ... })
Upvotes: 3