Tagged Questions

0
votes
3answers
23 views

MVC API Routing When Multiple Get Actions Are Present

There seems to be a thousand people asking the same question on stack overflow, but there doesn't seem to be a single solution to this problem. I am going to ask it again... I have an API controller ...
1
vote
2answers
24 views

Preventing access to routes in MVC 4

In my MVC application I have Player and Coach objects, and a user can be one or the other. I also have Team objects and what I want to know is how I prevent a user who is in a list of Players or is ...
0
votes
1answer
48 views

Generating Route Url to MVC controller action from WebAPI

Im used to generating route urls to other controller actions within an mvc controller action using something similar to below: public class ApplicationController : Controller { public ActionResult ...
1
vote
1answer
31 views

How to keep URL routing DRY

I want to have the option to have a route for UserName (which can change) and one for UserId. This way the user can gain the benefit of an easy to remember URL Users/{UserName} along with one that ...
0
votes
1answer
52 views

MVC Route Error Handler

I want to catch the latest unhandled error application and redirect it to error page whenever error has occurred. But I got error "No matching route found for RedirectToRoute." What's the problem with ...
0
votes
1answer
47 views

MVC Routing -> Include selected item of Html.DropDownList in URL

The signature of Action Method looks like this : public ActionResult DwellingAdvertsByCity( string cityName, int numberOfResultsPerPage, int pageIndex) My Razor form looks ...
1
vote
1answer
39 views

setting up a simple mvc route

I am working with mvc4 and attempting to write a really basic route but its not working and getting very frustrated with it! I want the url: http://www.mywebsite.com/my-page to trigger the controller ...
0
votes
2answers
46 views

MVC3 Custom routing

I developed a website with MVC and I have a little problem on how link addresses appears in the address bar. When I open the website, I have to log on first; after I log on into the account, the home ...
0
votes
1answer
56 views

MVC link text from address bar

I have made a website with MVC and I have a little problem on routing: the link addresses from address bar appears with some strange paramaters like: ...
2
votes
5answers
759 views

allow hyphens in URLs for asp.net mvc 2 controller names

[ActionName("about-us")] public ActionResult EditDetails(int id) { // your code } The above works for actions but I would like to be able to do the same (or similar) for controllers, ie have a ...
0
votes
2answers
433 views

Dynamically adding to RouteTable isnt working

I am currently writing a news article aspect to an application and I adding the new route (for the new article) to my RouteTable, which appears to add fine, but the routes are unreachable? The code I ...
0
votes
1answer
219 views

How do I convert an object to a RouteValueDictionary inside an Action?

I need to be able to pass multiple parameters if needed into an action. They will ultimately be passed into a second action which will know the details (how many, what they are called) but my first ...
1
vote
1answer
334 views

Questionnaire Wizard in MVC3

My requirement is to create a exam questionnaire wizard. The steps in wizard will be dynamically created.There will be some basic steps that will be common for some applicant like language settings ...
0
votes
0answers
159 views

MVC.SiteMap Custom Route with multiple parameters

I am using Mvc.Sitemap to configure my breadcrumbs with custom routes. I have a scenario where I have 2 ids back to back and need to skip one. The urls are defined below: Breadcrumbs look like Home ...
0
votes
1answer
37 views

Unexpected form url with mixed aspx & controller MVC .Net routes

I have two routes defined thus: //Custom route for legacy admin page routes.MapPageRoute( "LocaliseRoute", // Route name "Admin/Localise", ...

1 2 3 4 5 7
15 30 50 per page