Questions tagged [maproute]
148 questions
1
vote
1 answer
Another default MapRoute
In my website, I have the following default route:
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
…

Dan
- 1,518
- 5
- 20
- 48
1
vote
2 answers
custom mapRoute for special controller and action to be like this in MVC: http://example.com/someValue
I have this default mapRoute:
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
and some other…

Sepehr Estaki
- 331
- 5
- 19
1
vote
0 answers
iOS : How to plot polyline on existing route?
I plot the route between source and destination using the following piece of code. After plotting the route sucessfully, I get a list of coordinates where I wanted to plot another route on top of existing one with different color.
The use case I am…

Santosh
- 202
- 3
- 16
1
vote
1 answer
Understanding ASP.NET MVC 5 Routing
I know there a many Q&A's on here regarding MVC routing. Unfortunately, I am still having some issues regarding routing that I don't understand.
First and Foremost - Can I have onverloaded ActionResults in my Controller?
For example, I make a 3…

Sean Mc
- 83
- 1
- 8
1
vote
3 answers
How to declare a parameter as prefix on OData
Using a normal ApiController in WebApi, I made the following code to define a dynamic map route template for every ApiControllers:
config.Routes.MapHttpRoute(
name: "Sample",
routeTemplate: "{sessionId}/{controller}"
);
I want…

João Antunes
- 798
- 8
- 27
1
vote
1 answer
Calling method in MapRoute MVC
Is it possible to pass a parameter from "url" section to a method in "default" section of MapRoute?
routes.MapRoute(
name: "Language",
url: "{language}/{controller}/{action}/{id}-{description}",
defaults:…

mko
- 6,638
- 12
- 67
- 118
1
vote
0 answers
Bad hyperlink on changed map route MVC
I am building a ASP.NET MVC application. In the RouteConfig.cs I am adding MapRoutes as follows:
var appModel = new AppModel();
var apps = appModel.GetAppNames();
foreach (var appName in apps)
{
routes.MapRoute(
name: "application" +…

kiriz
- 655
- 1
- 7
- 24
1
vote
1 answer
ASP.NET MVC Search Results Page MapRoute Doesn't Work
How can i set mapRoute for search results page? My code doesn't work.
Global.asax.cs
routes.MapRoute(
name: "SearchResults",
url: "{action}/{Keyword}",
defaults: new { controller = "Home", action = "Search" }
…

sasailic
- 15
- 4
1
vote
1 answer
How to draw route from current to destination location on map view xamarin iOS
How to draw route map from my current location to destination location.
I want to draw route map on mapview from my current location which is device GPS location. to destination location {d}
using System;
using System.Drawing;
using…

kiran
- 4,285
- 7
- 53
- 98
1
vote
1 answer
ASP.NET MVC Routing: subfolder-like route
This is my file structure in my ASP.NET MVC 4 project, regarding controllers:
|--Models
|--Controllers
|
|--api
| |
| |--UsersController.cs (MyProject.Controllers.API.UsersController.cs)
| …

sports
- 7,851
- 14
- 72
- 129
1
vote
1 answer
asp.net mvc maproute
Greetings,
I have a problem with link in mvc application. When I run it via Visual Studio it's ok. The link then is as follows:
http://localhost:2566/ActivateClient/Activate/6543e2d6-707d-44ae-94eb-a75d27ea0d07
when I run it via IIS7 the link is as…

niao
- 4,972
- 19
- 66
- 114
1
vote
2 answers
How can i catch parameter on maproute?
How can i retrieve certain a section on routemap pattern.For instance i have a routemap pattern on my config file as routes.MapRoute("", "Post/{slug}", new { controller = "Post", action = "Index" }) and i want to catch slug parameter inside…
user3595082
1
vote
1 answer
setting lookup values for the url paramater in routes.maproute
Is there an easy way to define lookup values in your route.maproute?
example route:
routes.MapRoute(
name: "example route",
url: "product/{subcat}",
defaults: new { controller = "Redirect", action =…

ldp
- 23
- 4
1
vote
1 answer
MapRoute with my extension
How to create right MapRoute with my extension? (e.x. "my").
This MapRoute is correct
routes.MapRoute(
name: "Default",
url: "{controller}.my/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id =…

user2666676
- 51
- 1
- 3
1
vote
5 answers
Map route asp.net mvc
I'm trying to make my url seo friendly. I need to make url with this structure
www.domainname.com/article123.
And with this route
routes.MapRoute(
"articlename", // Route name
"aaaa/{articleID}", // URL with parameters
new…

VirtuoZ
- 163
- 2
- 5
- 14