Reputation: 202
Application is based on .NET 4.0 (Property window shows the same). I am trying to implement routing in ASP.NET Webforms. I added global.asax and trying to register routes. I tried adding below line to Glabal.asax
<%@ Import Namespace="System.Web.Routing" %>
It throws an error : The type or namespace name 'Routing' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
I'm not missing an assembly reference. I added reference to system.web(4.0) and system.web.routing(4.0) as well. Its still not working.
I don't know what is wrong here. Any help is appreciated
Upvotes: 1
Views: 8173
Reputation: 7696
Simply add the reference from Assemblies:
As @Fred indicated, please see Which NuGet package contains System.Web.Routing?
Upvotes: 0