ASP.NET Routing : RouteCollection class missing
Posted
by Shyju
on Stack Overflow
See other posts from Stack Overflow
or by Shyju
Published on 2009-07-31T16:32:41Z
Indexed on
2010/04/22
6:03 UTC
Read the original article
Hit count: 932
I am developing a website(web forms , not MVC) in VS 2008(with SP1 ).I am trying to incorporate the ASP.NET Routing.I am following the MSDN tutorial to do it. http://msdn.microsoft.com/en-us/library/cc668201.aspx I have added the below items to my glbal.asax.cs file as per 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 trying to build it is telling like "The type or namespace name 'RouteCollection' could not be found (are you missing a using directive or an assembly reference?)
I have System.web imported to my global.asax file
Any Idea how to get rid of it ?
© Stack Overflow or respective owner