Monday 15 September 2014

jquery - JQGrid URL Sometimes including controller in call -


So in my ASP.NET MVC application, this code is in javascript function ...

  JQuery ("#SomeResultsGrid"). JqGrid ({url: 'SomeSearch.mvc / SomeSearchResultsGridEventHandler', ...  

This loads on my default page and is just OK (Fidler has been confirmed) Now, if I Go to that default page (via HFL.quial link), the URL that posts after loading, now some search. MVC / some search. MVC / some search resets look like grid aventhandler. How and how can I solve it? / P>

You are using a relative URI, so the URI will be considered relative to the current location. To create a perfect path, a / :

  jQuery ("# ​​SomeResultsGrid"). JqGrid ({url: '/ SomeSearch. Mvc / SomeSearchResultsGridEventHandler', ...  

The problem is, now it will not work in a virtual folder. We handle it with the JS routine that you know about the site root using the information in the site A. Masters.


No comments:

Post a Comment