updating data in a grid or something like that when someone inputs new data !(WITHOUT ANY POSTBACKS)

回眸只為那壹抹淺笑 提交于 2019-12-13 04:29:59

问题


imagine that i have a web page in my application for inputing data and there is a grid at the bottom of them (showing inputing data)...

i want to force this web page acts like a windows application (mean i do not want any postback after enter and that grid should be updated after inputing data without postback)...

imagine that i opened this page in my pc and my friend has opened this page too / i want when i input data in ajax mode , that grid updated for my friend without any postback / like windows application ...

is timer a good idea for doing this ?

or is there a better way for doing that?

thanks in advance

best regards


回答1:


You're definitely going to have to go AJAX for this - the simplest (but definitely not the most efficient) method would be to add the AJAX Control Toolkit to your project, wrap your GridView in an UpdatePanel, and have a timer on the page to check the database to see if there's anything newer than last time you checked. If there has been a change, you can either re-databind the grid or just render that new content manually (and update the UpdatePanel).



来源:https://stackoverflow.com/questions/5491809/updating-data-in-a-grid-or-something-like-that-when-someone-inputs-new-data-wi

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