How to Retrieve Combobox PromptText After Closeing jQuery Dialog Box

How to Retrieve Combobox PromptText After Closeing jQuery Dialog Box

Hi all

I'm using jQuery ui Dialog box and I've a combo box in the dialog box.

Problem is when I select any value form combobox and close the combo box

when I reopen the combobox it keeps selected value. I need to retrieve Prompt Text when the dialog box close or open.


js scripit

  1. $('#divPopup').dialog({
            autoOpen: false,
            show: {
                effect: 'blind',
                duration: 800
            },
            hide: {
                effect: 'explode',
                duration: 800
            },
            title: 'Add Sub Category',
            width: 490,
            draggable: false,
            modal: true,
            close: function (event, ui) {
                var ddl = $('#DropDownList1');
                var txt = $('#lblErr');
                txt.text('');
                var txtBox = $('#txtSubCatName');
                txtBox.css('background', '');
                ddl.css('background', '');
    		}
        });


I'm using AjaxToolKit CascadingDropDown

HTML
  1. <asp:DropDownList ID="DropDownList1" runat="server" style="margin: 5px 0; width: 100%;" />
    	<ajax:CascadingDropDown ID="CascadingDropDown1" runat="server" TargetControlID="DropDownList1"
    		ServicePath="~/services/CasCadingService.asmx" ServiceMethod="GetCategory" Category="Category" LoadingText="Loading Categories...."
    		PromptText="--- Select Category ---" />


I'll really appreciate if someone solve this issue

Thanks in advance

Regards