手动更新使用JavaScript或jQuery的一个UpdatePanel [英] Update an UpdatePanel manually using JavaScript or jQuery

查看:188
本文介绍了手动更新使用JavaScript或jQuery的一个UpdatePanel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以手动更新使用JavaScript或jQuery的一个UpdatePanel?

Is it possible to update an UpdatePanel manually using JavaScript or jQuery?

我已经是一个文本框,在我的页面的顶部。当用户离开该文本框我要运行一些服务器code(它会添加一条记录到我的数据库),然后在页面的底部,我有一个UpdatePanel将得到刷新。在UpdatePanel有一个GridView这将对添加的记录条目)

What I have is a TextBox at the top of my page. When a user leaves that TextBox I want to run some server code (it will add a record to my database) then at the bottom of the page I have an UpdatePanel which will get refreshed. The UpdatePanel has a GridView which will have an entry for the record added)

推荐答案

我觉得我得到了我的答案......必须建立在UpdatePanel的一个隐藏按钮,然后拨打

I think I got my answer... have to create a hidden button in the UpdatePanel then call

__doPostBack('<%= Button.ClientID %>','');

这篇关于手动更新使用JavaScript或jQuery的一个UpdatePanel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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