开发者

asp repeater itemcommand not working on second click

开发者 https://www.devze.com 2023-04-01 19:34 出处:网络
I have a repeater which I bind the data using Bind method from the database. There is a Asp:Button with an onclientclick and o开发者_如何学编程nclick event. In OnClientClick I open a new window and on

I have a repeater which I bind the data using Bind method from the database. There is a Asp:Button with an onclientclick and o开发者_如何学编程nclick event. In OnClientClick I open a new window and onclick I am adding the data to the database. This works perfectly on the first Page load. After first click on any of the buttons in the repeater, the click events stops working on subsequent clicks.

I have spending hours on finding a solution for the same, can any one guide me where i am going wrong what needs to be done.

P.S: My application is AJAX Enabled , using WCF and JQUERY

Thanks & Regards, Phani...


Never Mind I got it solved my self. For others who are trying to solve the same issue, here is the solution:

The code below opens up a new window with out popup blocker blocking the window

OnClientClick of the button write Javascript like below to open a new window and refresh the parent window (I have to do this as the ItemCommand event was not firing until the page is refreshed)

OnClientClick = "target='_blank'; setTimeout("location.reload(true);", timeout);

Phani...

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号