JQGrid 不使用查询字符串

JQGrid not working with Query String

我有一个工作正常的 JQGrid,直到我将 QueryString 添加到主 URL。 如果 URL 如下所示,那么 JqGrid 正在工作: http://localhost:61605/Default.aspx

如果我改成:http://localhost:61605/Default.aspx/?Query1=SomeValue

然后它停止工作并给出错误

PopulationjQuery(...).jqGrid is not a function

TypeError: jQuery(...).jqGrid is not a function
    at LoadGrid (http://localhost:61605/Default.aspx/?Query1=SomeValue:289:34)
    at HTMLDocument.<anonymous> (http://localhost:61605/Default.aspx/?Query1=SomeValue:223:10)
    at x.Callbacks.l (http://ajax.microsoft.com/ajax/jquery/jquery-2.0.3.min.js:4:24882)
    at Object.x.Callbacks.c.fireWith [as resolveWith] (http://ajax.microsoft.com/ajax/jquery/jquery-2.0.3.min.js:4:25702)
    at Function.x.extend.ready (http://ajax.microsoft.com/ajax/jquery/jquery-2.0.3.min.js:4:2900)
    at HTMLDocument.S (http://ajax.microsoft.com/ajax/jquery/jquery-2.0.3.min.js:4:553)

有什么想法吗?

你注意到有一个 / 了吗?

http://localhost:61605/Default.aspx/?Query1=SomeValue
                                   ^

如果您使用了相对路径,这将更改 jqGrid.js 的路径。确保您处理这种情况或使用绝对路径或相对于 root 的路径!

如果您将路径提供为:

,我绝对确定它会起作用
http://localhost:61605/Default.aspx?Query1=SomeValue

URL: http://localhost:61605/Default.aspx?Query1=SomeValue