Questions tagged [maproute]

148 questions
2
votes
2 answers

MVC3 maproute without showing action?

If I have the following MapRoute: routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}", // URL with parameters new { controller = "Home", action…
NomenNescio
  • 2,899
  • 8
  • 44
  • 82
2
votes
2 answers

How to use Routing in MVC for SEO Friendly URL

Generally we have following sample code in our global.asax file. So, my question is how we can have multiple MapRoute and how to use them ??? I want URL like: http://domain/Home.aspx/Index/Cricket-Ball/12 public static void…
Sham
  • 691
  • 2
  • 13
  • 26
2
votes
2 answers

MVC3 MapRoute Ambiguous between Controller Name without area and the equal Area Name

This Is My Controllers in root (Without Area): Home Members And My Areas are: +General Controller1 Controller2 +Members Manage Member So My Login Action is in Members Controller (in Root) before I Add Members Area every thing is fine, but know…
Saeid
  • 13,224
  • 32
  • 107
  • 173
2
votes
1 answer

MapRoute And Master Page (MVC3) - request not working

Good Afternoon, I have a web application (MVC3) which has master page. I have the following link localhost/home/index?Id=10 In own master, when I make a request("id") the value returned is 10. When implemented the route. For the link to become…
Felipe
  • 33
  • 4
1
vote
1 answer

MVC MapRoute with username

I'm building a small MVC application. After a user logs in I want his/her route to display: www.appname.com/username/ Underneath of course same action is called for each user e.g. /home/index. How do I write my MapRoute to achieve that and what…
mishap
  • 8,176
  • 14
  • 61
  • 92
1
vote
1 answer

Server Error in '/' Application MVC3

im not sure what i messed up, but i just keep getting the following error upon f5. The resource cannot be found. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or…
aHaH
  • 223
  • 2
  • 6
  • 16
1
vote
1 answer

Specify special case handler for MapRoute in ASP.NET MVC 3

I have the following Route defined in Global.asax: routes.MapRoute( "IncidentActionWithId", // Route name "Incidents/{companyId}/{action}/{id}", // URL with parameters new { controller = "Incidents" }…
Maxim V. Pavlov
  • 10,303
  • 17
  • 74
  • 174
1
vote
1 answer

Url Mapping: Don't want to have to type Index in the url

I have the following URL map in Global.asax.cs: routes.MapRoute("RejectRevision", "{controller}/{Index}/{revisionId}" , new { controller = "RejectRevision", action = "Index", revisionId = "" }); But I don't want to have to type…
gangelo
  • 3,034
  • 4
  • 29
  • 43
1
vote
1 answer

Asp.net MVC and redirect to External site

I have created a mvc application, its working fine, now I want to add some route based on xml, I don't want to create action based on that, that will work on fly. i.e. www.lmenaria.com/site1 this will redirect to…
Laxmi Lal Menaria
  • 1,433
  • 4
  • 17
  • 30
1
vote
1 answer

route the url in MVC

I have this path In view Image with no resize I want to route the source url to an action . I must need to use this url format because i am rebuilding a site .so i want to make all the…
Null Pointer
  • 9,089
  • 26
  • 73
  • 118
1
vote
1 answer

MVC2 Slash char in url

I want to use encrypted strings in MVC2 urls. A typical url in my app looks like this: http://localhost:29558/Account/PasswordReset/ZKGeDMZikfIsnO8/MEs7SCBlI+MZo1Je8LM5dTEeCt3u91ARPUcavT5UXfVVRfyE Note that everything after PasswordReset/ is the…
Journeyman
  • 10,011
  • 16
  • 81
  • 129
1
vote
2 answers

Having dash or url on MapRoute

I try to get url from users and provide MapRoute like this: routes.MapRoute("checkUrl", "tools/{id}", new { controller = "Home", action = "tools" }, new { }); On this case, it's works for this url: "/tools/www.domain.com/" But how could I manage…
1
vote
4 answers

C# .net MapRoute to html file

How can I set MapRoute from root to index.html file? I would like to redirect http://localhost:61944/ to http://localhost:61944/index.html I try: routes.MapRoute( name: "Root", url: "index.html" ); Inside the…
Max Boy
  • 317
  • 6
  • 21
1
vote
1 answer

SKRoutingService.sharedInstance().calculateRoute without clearing previous route SKMapView

How use SKRoutingService for calculateRoute without clearing previous route that i use for navigation I just want know travel time for next rout but SKRoutingService clear my current rout that used for navigation.
Alex
  • 33
  • 3
1
vote
1 answer

MVC MapRoute gets 404 error

I have created the following MapRoute function. And it's being called right from Application_Start() in Global.asax. public static class RouteConfig { public static void RegisterRoutes( RouteCollection routes ) { routes.MapRoute( …
Kyle
  • 406
  • 7
  • 20
1 2
3
9 10