I am working on a .Net WebForms project and am using UpdatePanels in order to update some information on the page without doing a full post back and losing all the history from the web app (I’m letting JQM manage the history with its back button).
While I have gotten the UpdatePanel to work and display the information I want to, the elements lose their styling. For example, in one form I have a dropdown that updates the list of prices, but when the prices update the dropdown loses its JQM styling.
I have seen various solutions which recommend doing something like this:
$('#updateTable').load(function() {
$(this).trigger('create');
});
Unfortunately this does not work. The styling is not applied to the dropdown. However, if I simply call $('updateTable').trigger('create'); from the console the styling is applied again. I have tried binding to load and ready but it is not working. Any help would be appreciated.
You can subscribe for the endRequest event on the PageRequestManager and apply the styling there: http://msdn.microsoft.com/en-us/library/bb383810.aspx
Basically: