I am working on ASP.NET MVC3. I have a partial view RestaurantAdminNavigation.ascx
which i moved from Views/Restaurant
Folder to Views/Shared
Folder.
I have a action link in that view
<%:Html.ActionLink("Edit", "Edit", "Restaurant", new { id=Model.OId }) %>
It was working fine when it was at Views/Restaurant
folder but after moving at Views/Shared
folder, if I keep the parameters as a part of that action link, it shows me an error 'Can not resolve action edit'. But if i keep
<%:Html.ActionLink("Edit", "Edit", "Restaurant") %>
it does not show me error.
After Googling i understand the reason might be registering the routes. I need to register route in Global.ascx file but i can not understand what might should I code if this is the solution.