How to update an datagrid with webmethods

你说的曾经没有我的故事 提交于 2019-12-01 12:45:02
Jeff Sternal

You can absolutely use AJAX and web services to display tabular data (grids) in your ASP.NET applications. These StackOverflow questions offer a good introduction to several different options:

However, you cannot literally databind GridView or DataGrid controls in javascript functions. The grid controls are server-side objects, deeply integrated into the ASP.NET page lifecycle.

ASP.NET controls only exist inside Page instances - and no page instance is created during the execution of static WebMethods. For a great explanation of this, see Why do ASP.NET AJAX page methods have to be static?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!