As in the previous answer, you are not using asp controls. However, there are also disadvantages with Html.ActionLink, this is not so good if you want, for example, to put a link to the image. In this case, the syntax will be
<a href="<%= Url.Action( "ShowListPage", "MyController", new { modelId = 101 }) %>"> <img src="img.gif" /> </a>
Also, with your action in the controller, you would ideally have to do this and get a model in order to get to a view that is strongly typed for that model. Thus, you have a model object with a constructor with an identifier, for example
public MyModel(int modelId) { this.TheListThatHoldsTheGridData = MyDataLayerProc(modelId); }
So you can have your actions in the MyController controller, return a ShowListPage view (associated with the MyModel instance), for example,
public ActionResult ShowListPage(int modelId) { return View(new MyModel(modelId)); }
Hope this helps,
Mark
source share