Reputation: 8932
This is super straight forward, but somehow it is not working. Can you please take a look?
on my page I have:
<%= Html.ActionLink("My Recipes", "Index", "Recipes")%>
and i have the following controller:
namespace MyWebSite.Controllers
{
public class RecipesController : Controller
{
//
// GET: /Recipes/
public ActionResult Index()
{
return View();
}
the html that is generated is:
<a href="">My Recipes</a>
while I expect it to be:
<a href="/Recipes/Index">My Recipes</a>
My controller is named: RecipesController.cs and is in the Controllers folder with all my other controllers?
Whats wrong?
Many thanks!
Upvotes: 0
Views: 50