views:

140

answers:

1

I am trying a hello world project with ASP.net MVC and jquery grid

Followed the steps as per http://haacked.com/archive/2009/04/14/using-jquery-grid-with-asp.net-mvc.aspx

Everything seems to be fine when hitting F5 from VS2008. the grid is showing the data from the db

Now, when I set up a virtual directory and pointed to the same project, no data comes up

So I tried modifying the URL property of jquery grid from

    //url: '/Home/GetGridData/',

to url: '<% =Url.Action("GetGridData","~/Home") %>',

Still the data does not show up

Using fiddler, the differences when running in F5 mode and in virtual directory mode, there is the difference in the URL being requested

F5 http://localhost.:1188/Home/GetGridData?nd=1267102892819&amp;_search=false&amp;rows=10&amp;page=1&amp;sidx=Activity&amp;sord=asc

Virtual directory http://mymachine/dashboard/Home/GetGridData?nd=1267102919267&amp;_search=false&amp;rows=10&amp;page=1&amp;sidx=Sno&amp;sord=asc

Now, how do i fix up this error

A: 

The second parameter for Url.Action should be controllerName, not a virtual path. Use "Home" instead of "~/Home".

Sperling
Forgot to mention, yes i tried with HOME instead of the virtual paththat too didnt work
balalakshmi
Did you change the url for javascript/css? I tried the example and it works fine for me, except i hade to change src and href for javascript/css files to use "<%=Url.Content("")%>".
Sperling
Yes tahts been done too.due to that i was able to get rid of 404 for jquery files as said earlier
balalakshmi