Questions tagged [system.web.routing]
23 questions
13
votes
2 answers
Failing ASP.NET MVC route. Is this a bug or corner case?
I have an ASP.NET MVC 3 application where users can post suggestions along the lines of "bla bla would be better if yada yada yada".
For the suggestion detail page I have defined a nice SEO friendly route as follows:
routes.MapRoute(null,…

Sergi Papaseit
- 15,999
- 16
- 67
- 101
5
votes
5 answers
Asp.Net System.Web.Routing Find actual .aspx Page
I'm using System.Web.Routing to have some better URL's and have come across a problem. I need to know the actual page that's handling the request.
for example a request comes in as:
/basketball/home
I need to find the page that handles that…

John Boker
- 82,559
- 17
- 97
- 130
5
votes
1 answer
Role-based navigation display in MVC4 Bootstrap Sample
How are you supposed to conditionally display menu items based on roles in the Bootstrap Sample project? I was thinking of doing the following
Implement INavigatonRouteFilter - really just implementing the shouldRemove(Route navigationRoutes)…

tacos_tacos_tacos
- 10,277
- 11
- 73
- 126
4
votes
1 answer
How to create a RouteValueDictionary given a virtual path
I would like to know if there is a method that, given a virtual path, will return a collection of parameter names and values for a route that matches the path. I need this to get the parameters of the URL on the target page without resorting to…

Mark Norgate
- 51
- 2
3
votes
2 answers
The type or namespace name 'routing' does not exist in the namespace 'system.web' visual studio
The type or namespace name 'Routing' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
I added web reference System.Web.Routing, but still it showing error.

Firoz Khan
- 623
- 1
- 9
- 23
3
votes
1 answer
Parsing a URL Using ASP.NET MVC Routing
I have a URL in string format that I want to parse to get the relevent Route Values. I could parse the string manually, but I want to use my routing configuration so I am not tied to the particular string format (so I can change the URL format…

DownChapel
- 1,384
- 1
- 16
- 31
3
votes
1 answer
ASP.NET URL contains multi "dot" symbol
I wrote the code in global.asax contain this
oRoutes.MapPageRoute("test-route", "home/{cURL}", "~/test.aspx");
everything fine, but had error when URL contains "." symbol. And I add the code below just can fix only one dot in URL.

Guest
- 77
- 9
2
votes
2 answers
Get the virtual url when using routing with webforms
How do I get the virtual url and not the webforms page name that the url is mapped to when using System.Web.Routing with webforms.
I want the url "/confirm/5" and not "Confirm.aspx".

Jet Basrawi
- 3,185
- 2
- 15
- 14
2
votes
2 answers
Web.Routing for the site root or homepage
I am doing some work with Web.Routing, using it to have friendly urls and nice Rest like interfaces to a site that is essentially rendered by a single IHttpHandler. There are no webforms, the handler generates all the html/json and writes it as part…

Aquinas
- 188
- 2
- 16
2
votes
2 answers
ASP.NET System.Web.Routing and Querystring Parameters
I am using ASP.Net 3.5 SP1 "System.Web.Routing" to enable URL routing in my WebForm Application. Now what i needed is to pass some parameters in QueryString eg:
http://www.mydomain.com/Search/Books/Computers?sort=author&pagesize=10
This is the route…

Shoaib Shaikh
- 4,565
- 1
- 27
- 35
1
vote
1 answer
The type or namespace name 'Routing' does not exist in the namespace 'System.Web'
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…

user2645738
- 168
- 2
- 7
- 22
1
vote
2 answers
Mod_Mono ASP.NET MVC 4 Deployment Issue
I have an ASP.NET MVC 4 application which I have developed using Xamarin Studio on OS X. I am deploying into a Docker container running Ubuntu Server (latest version) with mono 3.2.8 installed along with mod_mono and apache.
I've successfully…

ohlando
- 321
- 1
- 7
1
vote
0 answers
Could not add system.web.routing in class library
I want to create a class library for an MVC 4 web application.I created class library project in same solution and write classes and other stuff in class library.I added the reference System .Web.Routing in my class library project. But when i tried…

user3105947
- 47
- 8
1
vote
2 answers
Using Routing in Asp.Net Webform Application
I am using System.Web.Routing in the Asp.Net Webform Application. I wrote the following route in the global.asax
routes.RouteExistingFiles = true; // I made true/false both, but none works
routes.Add("competition", new Route
(
…

Zohaib
- 496
- 7
- 21
0
votes
0 answers
RouteTable.Routes.Add in .NET 5
I am converting below code from .NET framework 4.7.2 to .NET 5 but system.web.routing is not available anymore in .NET 5. Wondering is there any workaround for it?
RouteTable.Routes.Add(new Route
(
"sample",
…

user13724866
- 13
- 3