c# - Routing in Asp.Net MVC4 -
c# - Routing in Asp.Net MVC4 -
i getting "virtualpath must non-empty string starting ~/."
error
description: unhandled exception occurred during execution of current web request. please review stack trace more info error , originated in code.
exception details: system.argumentexception: virtualpath must non-empty string starting ~/. parameter name: virtualpath
in below code:
public class routetablehelper { public static routecollection usersiteroutes() { routecollection routes = new routecollection(); registerroutes(routes); homecoming routes; } public static void registerroutes(routecollection routes) { ............... routes.mappageroute("catalogannualreport2013", "catalog/annualreport2013", "www.facebook.com"); ............. } }
routing doesn't extend past own site. might improve utilize standard mvc routing setup , create controller action redirects user facebook?
public class catalogcontroller:controller { public actionresult annualreport2013() { homecoming redirect("http://www.facebook.com"); } }
c# asp.net asp.net-mvc
Comments
Post a Comment