I have existing code with below @html.RenderAction()
method:
Html.RenderAction("Widget", "Widget", new
{
wTitle = "World map dashboard",
wTitleSpan = "",
wTitleDisplay = "",
height = "300px;",
wAction = "GetWorldMapMethod",
wCssId = "WorldMap",
cssOptions = "WorldMap",
ShipSelection = "fleet",
infoTitle = HttpUtility.HtmlEncode("<b>Info dashboard</b>"),
infoText = HttpUtility.HtmlEncode("<p>Info</p>")
});
When this is executed, the method GetWorldMapMethod()
is called. I'm trying to understand how this parameter action method is getting called.
Here's my routing configuration:
routes.MapRoute(
"ManagementShipDetails",
"Management/ShipDetails/{id}/{successMessage}",
new {controller = "Management", action = "ShipDetails", successMessage = UrlParameter.Optional}
);
routes.MapRoute(
"Report",
"Data/Report/{viewname}",
new
{
controller = "Data",
action = "Report",
});
routes.MapRoute(
"Apikeydelete",
"Account/DeleteApiKey/{key}",
new {controller = "Account", action = "DeleteApiKey"}
);
routes.MapRoute(
"FleetOverview",
"Fleet",
new {controller = "Data", action = "Fleet"}
);
routes.MapRoute(
"ShipOverview",
"{ShipName}/Overview",
new {controller = "Data", action = "Overview", ShipName = UrlParameter.Optional}
);
routes.MapRoute(
"Hull Performance",
"{ShipName}/HullPerformanceDrop",
new {controller = "Data", action = "HullPerformanceDrop", ShipName = UrlParameter.Optional}
);
routes.MapRoute(
"ReportingViewReport",
"{ShipName}/Report/{id}",
new
{
controller = "Reporting",
action = "Report",
ShipName = UrlParameter.Optional,
id = UrlParameter.Optional
}
);
routes.MapRoute(
"PortalDataGetValue",
"PortalData/GetValue/{tag}/{selection}/{date}/{Filter}",
new {controller = "PortalData", action = "GetValue", Filter = UrlParameter.Optional}
);
routes.MapRoute(
"PortalDataGetDashboardData",
"PortalData/GetDashboardData/{selection}/{date}",
new {controller = "PortalData", action = "GetDashboardData", Filter = UrlParameter.Optional}
);
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new {controller = "Dashboards", action = "Index", id = UrlParameter.Optional} // Parameter defaults
);