i want to show a jQuery UI Dialog from Codebehind and need to refresh it after postbacks.
The dialog is a control to filter and find data. So the user selects from
Here is how I solved the same issue. It removes any old dialogs and adds the newly updated one back to the form so the postbacks work. I put the following code in a script block that gets added to the page via ScriptManager.RegisterStartupScript in the code behind.
$('#divMyDialogAdded').remove();
$('#divMyDialog').dialog({
autoOpen: false,
modal: true
}).parent().appendTo('form:first');
$('#divMyDialog').attr('id', 'divMyDialogAdded');