I am developing a website (web forms, not MVC) in VS 2008 (SP1). I am trying to enable ASP.NET Routing. I am following the MSDN tutorial to do this.
http://msdn.microsoft.com/en-us/library/cc668201.aspx
I added the following elements to the glbal.asax.cs file according to the tutorial
protected void Application_Start(object sender, EventArgs e)
{
RegisterRoutes(RouteTable.Routes);
}
public static void RegisterRoutes(RouteCollection routes)
{
routes.Add(new Route
(
"Category/{action}/{categoryName}"
, new CategoryRouteHandler()
));
}
When you try to create this, it says that "The type or name of the namespace" RouteCollection "could not be found (did you specify a usage directive or assembly reference?)
I have System.web imported into my global.asax file
Any idea how to get rid of it?
Shyju source
share