how to update label value from jquery modal popup in asp.net
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");
});
精彩评论