I’m trying to store routes in database, and list those based on parameters.
Kinda like:
Route = “NewsDetail”
ParamKey 1 = “NewsID”
ParamVal 1 = “4”
…. 2..3
And I would like to know how I create those routeparameters for the link…
<%= Html.RouteLink("Somename", "NewsDetali", new { newsID = Model.News.NewsID, headline = Model.News.Headline })%>
is there some way to pass those parameters dynamicallly?
/M
Here’s what you could do. As always start with a model:
Then in your controller action populate this model:
And finally in your view: