I have several small div
s which utilizing jQuery
draggable. These div
s are placed in an UpdatePanel
, and on dragstop I use the _doPostBack()
JavaScript function. where i extract necessary information from the pages form.
My problem is that when i call this function the whole page is re-loaded but i only want the update panel to be re-loaded.
While Phairoh's solution seems theoretically sound, I have also found another solution to this problem. By passing the UpdatePanels id as a paramater (event target) for the doPostBack function the update panel will post back but not the entire page.
*note: second parameter is for addition event args
hope this helps someone!
EDIT: so it seems this same piece of advice was given above as i was typing :)
If anyone's having trouble with this (as I was), you can get the postback code for a button by adding the UseSubmitBehavior="false" attribute to it. If you examine the rendered source of the button, you'll see the exact javascript you need to execute. In my case it was using the name of the button rather than the id.