0

I'm developing an ASP.NET MVC application as an API for my mobile application. I'm going to send some parameters using http GET method.

When I debug my application, http://localhost:58757/ is mapped to http://localhost:58757/home/index.But I don't know how to send parameters to controllers of home . Currently I use its complete URL i.e. http://localhost:58757/home/index?userID=10&language=en to pass parameters. I want to know are there any methods so I can remove /home/index from this URL and still passing parameters?

VSB
  • 9,825
  • 16
  • 72
  • 145
  • You just leave it out, just like without parameters – Sami Kuhmonen Feb 18 '17 at 00:17
  • can you post your route configuration pelase – Simon Price Feb 18 '17 at 00:54
  • Possible duplicate of [Assigning multiple routes to the same controller or action in ASP MVC 6](http://stackoverflow.com/questions/35296018/assigning-multiple-routes-to-the-same-controller-or-action-in-asp-mvc-6) – Simon Price Feb 18 '17 at 01:01
  • 1
    @SimonPrice, That link has nothing to do with OP's issue, not to mention the question is tagged MVC-4 –  Feb 18 '17 at 01:10
  • 1
    What is wrong with using `http://localhost:58757?userID=10&language=en`? –  Feb 18 '17 at 01:27
  • And if your creating a link in a view - `@Html.ActionLink("...", "Index", "Home", new { userID = 10, language = "en" }, null)` –  Feb 18 '17 at 02:15

0 Answers0