I have a cart in master page that this cart is inside update panel.
In my content page I have a listview that in this listview exist linkbutton for add product to my cart.
I want to add product to cart using these linkbuttons without refresh, and cart is updated. I have this code in my content page:
`protected void Page_Init(object sender, EventArgs e) { UpdatePanel up = (this.Master.Master.FindControl("UpCart")) as UpdatePanel;
AsyncPostBackTrigger trigger = new AsyncPostBackTrigger();
trigger.ControlID = lvNewProducts.UniqueID;
trigger.EventName = "ItemCommand";
up.Triggers.Add(trigger);
}`
but my page is refreshed when I click in linkbutton.
Please help me!
Aucun commentaire:
Enregistrer un commentaire