Reputation: 2917
I have written an action method in the ReservationController class. To get this code to work I should move the GetCoreTab file to the Reservation folder. I do not want to do that since I give the path of the GetCoreTab file in the ReservationController class. I want to give the path, such that the code for the GetCoreTab method would work from the Reservation controller class.
Structure:
Code:
public PartialViewResult GetCoreTab()
{
return PartialView("Tabs/GetCoreTab");
}
HTML:
<a href="<%= Url.Action("GetCoreTab", "Reservation") %>" class="a">
<b>
<div id="home" class="menu">
</div>
</b>
</a>
Any ideas?
Thanks
Upvotes: 0
Views: 333
Reputation: 1038720
You could specify the path to the partial:
public PartialViewResult GetCoreTab()
{
return PartialView("~/Views/Shared/Tabs/GetCoreTab.ascx");
}
Upvotes: 1