Questions tagged [routeconfig]

86 questions
0
votes
2 answers

How to resolve a "MethodNotAllowedHttpException" error in Laravel?

I am developing a passport API in Laravel. I am getting a "MethodNotAllowedHttpException". I don't get any idea, what fix do I have to do.
0
votes
1 answer

how to properly call routing in angular?

I have a main module and in it are some routes. i have a few more modules and all of those are included in my main module. From one of my home module function, I am trying to route but getting error. where as other function on same app is routing…
nimra asad
  • 179
  • 6
  • 18
0
votes
0 answers

how to force MVC to follow the complete route for index

I'm working on multi language web site and everything works fine , but the problem is that when I run the project, I have this URL www.example.com while I want to have it like www.example.com/fr for for example France. I have this problem just for…
neda Derakhshesh
  • 1,103
  • 2
  • 20
  • 43
0
votes
4 answers

MVC Link inside a page

I am working in a .NET project with MVC and I need to make work a link that point to a section on the same page. The following code works well without MVC: Section 1

Section 1

Now this…
MarcosF8
  • 1,848
  • 5
  • 19
  • 33
0
votes
1 answer

Setting Default Controller and Action using Route attributes in ASP.Net MVC 5

I am very new to ASP.Net MVC and trying to learn ASP.Net MVC 5. I am trying to learn it by creating a sample project from scratch without scaffolding.I know that it is possible to specify the Default Controller and Default Action in the…
Ven
  • 235
  • 4
  • 12
0
votes
1 answer

Creating a Fall-Through Route Rule after the Default Rule

How can I create a fall-through (fallback) route for products after the default route that maps to a product controller? Instead of example.com/product/laptop I want example.com/laptop /product is an application that does all sorts of work. However,…
User970008
  • 1,135
  • 3
  • 20
  • 49
0
votes
0 answers

How to format QueryString in RouteConfig if your parameter in Action is a Class in MVC?

I have this piece of code in controller where it accepts a class as a parameter public ActionResult Index(PaginationModel paginationViewModel = null) { //do some logic here return View(viewModel); } And here's what the model looks…
0
votes
2 answers

Route configuration looking for an id in my URL

How do I correct my routing to fix an issue with ajax .load() I modified my route to my spacecontroller so that it looks like this routes.MapRoute( name: "SpaceCleanRoute", url: "Space/{id}", defaults: new {…
chuckd
  • 13,460
  • 29
  • 152
  • 331
0
votes
0 answers

How do I link an action method to another area's controllers action?

I have two areas home and account. When I'm on the Index.cshtml page of the home controller and I want to go to my account controller's Login.cshtml page I use this actionlink to go to the login action method which should view…
chuckd
  • 13,460
  • 29
  • 152
  • 331
0
votes
0 answers

How do I modify route values to change the url string in the browser

I created two areas (with controllers, views, registration, etc) with VS's scaffolding process. One for homecontroller and one called account. I added a single line "route.DataTokens" to the routeconfig.cs file to connect to the homecontroller on…
chuckd
  • 13,460
  • 29
  • 152
  • 331
0
votes
2 answers

routes.MapRoute Confusion

I know it's the general approach: routes.MapRoute ( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } ); But If I try like…
0
votes
2 answers

URL Routing in MVC C#

I am defining my application URLs like domainname.com/storecontroller/storeaction/storename I want to rewrite like domainname.com/storecontroller/storename Actually, I need to skip storeaction from the url, I don't want to do it with querystring…
Nomi Ali
  • 2,165
  • 3
  • 27
  • 48
0
votes
1 answer

AngularJS hash url and MVC routing

I am facing issue in navigating to URL. My default page set to Login and my application URL is http://localhost:12345/#/. This works well but there are two ways the user can login to application Direct through the application. Getting username…
0
votes
0 answers

ASP.NET URL OF IMAGE does not exist

I have created a blog with ASP.NET MVC 4. The problem is when my url is not localhost I cannot see any pictures inside my Posts, because they get wrong url. The url of the post can be: 1.localhost/post/2015/4/name_of_post or…
0
votes
0 answers

Passing route values from a form using FormMethod.Get

I have a form which on submit passes all input field values as a querystring. The address i get after submitting is: http://localhost:51246/Markets?Keyword=keywordhere The preferred address format is: http://localhost:51246/Markets/keywordhere The…
Sam Jones
  • 4,443
  • 2
  • 40
  • 45