SO, I have 20+ Action
s in a controller as here below:
public ActionResult DoThis()
{
Image img = Image.FromFile("DoThis.png");
//some other stuff to be done.
return View();
}
public ActionResult DoThat()
{
Image img = Image.FromFile("DoThat.png");
//some other stuff to be done.
return View();
}
I have a view which I want to show ActionLink
for each action that is placed in my controller with assigned picture to the action, let say this:
@foreach
{
<div class="col-sm-4">
<div class="product-image-wrapper">
<div class="single-products">
<div class="productinfo text-center">
<img src="the image assigned to the controller actions" alt="" />
<h3 style="font-family:'Myriad عربي'">Action Name ؟</h3>
<a href="@URL.Action("The acion link from controller")" class="btn btn-default add-to-cart">Click Here</a>
</div>
</div>
</div>
</div>
}
Is that possible or I am asking too much?