Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/69.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
jQueryGrid未在ASP.Net MVC中调用URL_Jquery_Asp.net Mvc - Fatal编程技术网

jQueryGrid未在ASP.Net MVC中调用URL

jQueryGrid未在ASP.Net MVC中调用URL,jquery,asp.net-mvc,Jquery,Asp.net Mvc,我一直在尝试在我的Asp.NETMVC应用程序中实现jQuery的网格功能。我现在正在XP上测试一切,所以自从我使用IIS5以来,我就启用了mvc扩展 我遇到了两个问题 我的jquery网格似乎没有被调用。 我使用URL.Content方法引用了所有jquery&grid文件 以下是我的主要内容: 如果第三个警报没有触发,那么对jqGrid的调用将终止。使用Firebug或IE 8脚本调试器查看错误。第二个问题是正确的行为。别担心。当网格调用您的操作时,它将是正确的。不确定这是否是实际的答案。但

我一直在尝试在我的Asp.NETMVC应用程序中实现jQuery的网格功能。我现在正在XP上测试一切,所以自从我使用IIS5以来,我就启用了mvc扩展

我遇到了两个问题

我的jquery网格似乎没有被调用。 我使用URL.Content方法引用了所有jquery&grid文件 以下是我的主要内容:
如果第三个警报没有触发,那么对jqGrid的调用将终止。使用Firebug或IE 8脚本调试器查看错误。第二个问题是正确的行为。别担心。当网格调用您的操作时,它将是正确的。

不确定这是否是实际的答案。但是我后退了几步,用jQuery做了一些非常简单的尝试

我做了一个简单的帖子。但是对于URL,我使用了

<%Html.Action("myControllerFunction")%>
这就是让它工作所需要的一切。所以,当我再次有机会的时候,我会在网格上测试它,但我想它至少是相关的

但我确实使用了firebug来帮助我达到这一点

     public ActionResult GridData(string sidx, string sord, int? page, int? rows)
    {
        int totalPages = 1; // we'll implement later
        int? pageSize = rows;
        int totalRecords = 3; // implement later

        var jsonData = new
        {
            total = totalPages,
            page = page,
            records = totalRecords,
            rows = new[]{
                new {id = 1, cell = new[] {"1", "-7", "Is this a good question?"}},
                new {id = 2, cell = new[] {"2", "15", "Is this a blatant ripoff?"}},
                new {id = 3, cell = new[] {"3", "23", "Why is the sky blue?"}}
            }
        };
        return Json(jsonData);
    }
<%Html.Action("myControllerFunction")%>