Skip to main content

All Questions

Filter by
Sorted by
Tagged with
1 vote
1 answer
133 views

APS.NET MVC request routing using query parameter names

I'm trying to understand attribute routing in ASP.NET MVC. I understand how routing matches on url elements, but not query parameters. For example, say I have a rest-style book lookup service that can ...
Andy Johnson's user avatar
  • 8,181
0 votes
1 answer
183 views

Why is MVC attribute routing not matching this GUID?

I'm trying to use attribute routing. For various reasons, one of my Guid argments required for a password reset must not be in the queryString so I've had to put it in the path. That itself isn't a ...
NickG's user avatar
  • 9,840
0 votes
1 answer
36 views

Unable to get webApi result in controller

I am trying to create constraint for route.Based on the access info retrieved from Db,i will choose which route to choose. I have created controller inheriting IRouteConstraint and calling repository,...
AMDI's user avatar
  • 983
0 votes
1 answer
353 views

how to Create Url in mvc4

custom route is not working in my case i am trying to Create a URL in mvc4. Route url:- routes.MapRoute( name: "DocumentDetails", url: "DocumentDetails", ...
Dip Girase's user avatar
0 votes
0 answers
150 views

Default route in MVC project with areas

I have an ASP MVC 4 project which contains areas and is structured as follows: Areas MyArea Controllers MyAreaController.cs MyAreaRegistration.cs Controllers HomeController.cs Global.asax In Global....
Alexandru Popa's user avatar
0 votes
1 answer
69 views

Server Error in '/' Application in MVC 5 application

I am currently learning MVC 5 by watching video tutorials. I have created one simple customercontroller with two action methods i.e. (AddCustomer and Submit). Here i have created one simple view for ...
Kishor Kulkarni's user avatar
1 vote
1 answer
612 views

Attribute Routing over Convention-based Routing in MVC, which one would be called first?

I am assuming that the convention routing would be added to the route table first because it is getting registered in the global.asax file like this RouteConfig.RegisterRoutes(RouteTable.Routes); Now ...
Lijin Durairaj's user avatar
0 votes
1 answer
75 views

ASP.Net Routing: Customer ID not passing to action

see my url localhost:55831/Customers/Edit/1/ALFKI which i generate using @Html.RouteLink @Html.RouteLink("Edit", "PageWithId", new { controller = "Customers", action = "Edit", id = item....
Monojit Sarkar's user avatar
-1 votes
1 answer
250 views

MVC Custom Attribute routing with City and Country URL

I want to create custom attribute routing in MVC, where I want my URLs like this : www.domain.com/in/best-restaurants-in-india // FOR COUNTRY INDIA and www.domain.com/in/best-restaurants-in-new-...
ankit sharma's user avatar
0 votes
1 answer
223 views

Optional middle parameter in MVC4 Route

I am trying to create a controller action that receives several parameters for filtering a scope and then the final parameter is a required paging parameter for paging the results. //Example Action ...
SomeShinyObject's user avatar
-1 votes
1 answer
31 views

MVC 4 routing to a controller

I am new to MVC and I am trying to mess around by creating a practice site which will be a gallery site for viewing and uploading images. The problem I encountered is that I cannot get the routing to ...
Tak's user avatar
  • 5
0 votes
1 answer
936 views

Map Web Api MapHttpRoute to Base Url

Hi I have a Controller as shown below, [RoutePrefix("")] public class ApiInformationController : Controller { public ActionResult Index() { var info = new ApplicationInformation ...
Vinay's user avatar
  • 285
0 votes
1 answer
379 views

Posting form to different controller action not working in MVC

I have defined the default route in the RouteConfig.cs which show below: public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"...
Sohail Ali's user avatar
0 votes
0 answers
594 views

Custom routes rendering with Html.BeginRouteForm

I'm using custom route mapping in following way: context.MapRoute( "CustomRoute", "Area/{controller}/{id}", new { controller = "Task", action = "Index", id = UrlParameter....
mbigun's user avatar
  • 1,302
0 votes
2 answers
104 views

Change application behaviour based on whole URL

This might sound like a strange one. I'm hoping to have two identical instances of an application behave differently based on the URL used to access them. I have two instances of the app deployed on ...
Jack Parkinson's user avatar

15 30 50 per page
1
2 3 4 5
41