I have a MVC 2 project runnin in .net 3.5. There are some Webforms which i have in a separate folder called "Forms". I need to routing to be implemented for this page. Like, localhost/home.aspx should be re-directed to localhost/Forms/home.aspx. When i tried using the following code,
routes.MapRoute(
"Default", // Route name
"home.aspx", // URL with parameters
@"Forms/Home.aspx"// Parameter defaults
);
I get an error saying,
The RouteData must contain an item named 'controller'
I tried this link, but when i try to implement
routes.MapPageRoute("ReportRoute", // Route name
"Reports/{reportname}", // URL
"~/CommonReports/{reportname}.aspx" // File
);`
Iam not getting the MapPageRoute() method in my routes object. Could some one helpme how to handle this? Thanks in Advance