_dopostback无法正常工作 [英] _dopostback not working

查看:96
本文介绍了_dopostback无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Mentors,



我试图使用_dopostback从我的页面的javascript调用另一个页面的函数后面的代码。



但它没有打电话。



我试着调用那个页面的加载事件,即使没有被解雇。



我的电话是:



__doPostBack(window.parent.frames [firstGrid]。document.getElementById(' 'InboxGrid'')。id,'''');



请告诉我哪里错了?



我可以使用__dopostback来调用另一个页面的codebehind函数吗?

Hello Mentors,

I am trying to call a code behind function of another page from javascript of my page using _dopostback.

But its not calling.

I tried calling the load event of that page also even that is not being fired.

my call is:

__doPostBack(window.parent.frames["firstGrid"].document.getElementById(''InboxGrid'').id, '''');

please tell me where i am wrong?

can i use __dopostback to call the codebehind function of another page?

推荐答案

使用XMLHTTPRequest Concept删除另一个页面中的记录。



XMLHTTPRequest示例 [ ^ ]





删除记录后,刷新当前页面使用如下脚本,在此之前将隐藏变量中的一个临时变量保存为



document.getElementById(''hdnDeletedRecord'')。value =''DELETE '';

document.forms [0] .submit();



在aspx.cs页面中



检查此变量,如果隐藏变量包含''DELETE'',则重新加载网格。
Use XMLHTTPRequest Concept to delete the record in another page.

XMLHTTPRequest example[^]


After deleting the record, refresh the current page by using script as follows,before this save one temp variable in hidden variable as

document.getElementById(''hdnDeletedRecord'').value=''DELETE'';
document.forms[0].submit();

In aspx.cs page

check this variable and if hidden variable contains ''DELETE'' then reload the grid.


这篇关于_dopostback无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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