Let's say I have this Controller:
public class GlobalizationController : Controller
{
public JavaScriptResult GlobalizedLabels(string virtualPath)
{
return new JavaScriptResult();
}
}
I want the controller to handle (i.e. invoke from) any of the relative URLs below:
- /globalization/~Enlargement/Controls/Container.ascx
- /globalization/test/foobar.aspx
- /globalization/HappyTimes/Are/Right/Now
What would my entry in global.asax routes.MapRoute()
entry look like? As in...
routes.MapRoute("Globalization", "globalization/{virtualPath}", new
{
controller = "Globalization",
action = "GlobalizedLabels"
});
The URL pattern "{virtualPath}" is wrong. What should it be?