开发者

how to update label value from jquery modal popup in asp.net

开发者 https://www.devze.com 2023-03-10 04:12 出处:网络
I have a page, product.aspx.Inside this page I have a label that shows the count of开发者_运维问答 products added to basket.I also have viewcart.aspx page to show my cart item and edit or delete produ

I have a page, product.aspx. Inside this page I have a label that shows the count of开发者_运维问答 products added to basket. I also have viewcart.aspx page to show my cart item and edit or delete product.

Everything is well but when I delete a product from viewcart.aspx, I want to decrement the label value on product.aspx. How can I do that?

I use this jQuery to show viewcart.aspx on modal popup: http://deseloper.org/examples/simple-modal-redux/

also I've tried to use

Label lbl = (Label)this.PreviousPage.FindControl("countlbl");

How can I solve this problem?


In the viewcart.aspx page, you could add some jQuery to fire when it closes (i.e. on the onUnload event):

$(window).unload(function() {
  window.opener.$("#product_count_label").html("new count of products");
});
0

精彩评论

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

关注公众号