How can I convert
$("#myChildTabName").load("./MyController/MyMethod/" + myParameter);
to use @url.Action ?
MyMethod returns a PartialView. Basically I am I want to load a partial view upon click on the Tab.
Update as below:
I have figured out a solution as below, but this is giving an error saying that applicationID does not exist in the current context. An alert just above the jQuery call does display applicationID.
//The below code DOES NOT work.
function LoadTabContents(applicationID)
{
$("#currentTab").load('@Url.Action("TabMethod", "MyController", new { @id = applicationID })')
}
//The below code works fine.
function LoadTabContents(applicationID)
{
$("#currentTab").load('@Url.Action("TabMethod", "MyController", new { @id = 123})')
}