onclientclick ajax,c# - OnClick and OnClientClick - Stack Overflow

I have an image button on a pop up page which is opened by another page

ID="Button_kalem_islemikaydet"

runat="server"

CausesValidation="False"

ImageUrl="~/images/butonlar/buyuk/Kaydet.jpg"

meta:resourcekey="Button_kalem_islemikaydetResource1"

OnClick="Button_ust_islemikaydet_Click"

OnClientClick="f2()"

Width="100" />

f2() is

function f2() {

opener.document.getElementById("TextBox1").value = "hello world";

opener.document.getElementById("HiddenField1").value = "hello world";

window.opener.location.href = window.opener.location.href;

}

And Button_ust_islemikaydet_Click is another method implemented in aspx.cs file and it updates the database tables which are shown in the parent page in a GridView.

What I am trying to do is to doPostBack I mean refresh the opener(parent) page.And with these above codes refresh is working.However, parent page still shows the same data before the refresh.And the reason is that OnClientClick works before OnClick method

So my question is that is there any way I can run the method on OnClick and finish it and then run the OnClientClick method?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值