如何将JsonData从正常的aspx代码背后的页面返回到jquery脚本? [英] How to Return a JsonData from a normal aspx codebehind page to jquery script?

查看:104
本文介绍了如何将JsonData从正常的aspx代码背后的页面返回到jquery脚本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在普通的aspx页面中填充一个jqGrid ..
所以我在代码隐藏页面中有一个方法可以从数据库中获取网格的数据...
现在,我希望将这些数据返回到网格的jquery脚本.
我无法使用 JsonResult类和JqGridJsonResult()方法..因为System.Web.Mvc命名空间仅在MVC中可用. 因此,如果要在页面后面的普通代码中使用它,我该怎么做?

I want to populate a jqGrid in a normal aspx page..
So i have a Method in codebehind page to get data for the grid from database...
Now i want that data to be returned to jquery script of the grid.
I am not able to use JsonResult class and JqGridJsonResult() method.. Because System.Web.Mvc namespace is available in MVC alone..
So if want to use it in normal code behind page, What i have to do??
Is there any other way to populate the Grid?

推荐答案

^ ]

只需谷歌搜索10秒钟:)

请注意,您也可以使用任何json序列化库来完成此操作.
http://blog.prabir.me/post/Using-jqGrid-with-ASPNET-Web-Forms-e28093-Part-I.aspx[^]

just googling 10 secs :)

notice you can use any json serialization library also to accomplish this.


这篇关于如何将JsonData从正常的aspx代码背后的页面返回到jquery脚本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆