How to trigger a webpart to reload via ajax?

Marcel Guldemond asked on October 26, 2015 20:34

The scenario I'm trying to build in Kentico is having a user action in one webpart cause the reload/update of a second webpart without reloading the whole page.

An example would be adding an item to a shopping cart: if a user clicks on the 'add item to cart' button (first webpart), then the item total in the cart (second webpart) in the page header should update without reloading the whole page.

I know how to do this with an asp.net mvc application, but I haven't yet figured out how to do this with Kentico.

thanks, Marcel

Recent Answers


Brenden Kehren answered on October 28, 2015 02:35

Wrap both webparts in the same update panel. So place both webparts in the same zone and on the zone, set the Use update panel in the Ajax section. If the webparts are not in the same webpart zone, you might need to do some jquery/ajax magic to get this to happen.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.