Monday, March 26, 2012

ListSearchExtender causing Sys.InvalidOperationException

Hello all,

I am having an issue with ListSearchExtender. I have the ListSearchExtender inside of an Panel, which is inside of an UpdatPanel. There is a CheckBox on the form, that when clicks, causes the Panel to become visible. When I select the CheckBox, the Panel shows up just fine an everything works. When I do anything that causes a postback after this is done, I get the following javascript error:

Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method.

I know the problem is coming from the ListSearchExtender because when I take it out, I do not get this error. Below is the UpdatePanel that contains the ListSearchExtender. Any help would be greatly appreciated.

Thanks,

Nick

<aspajax:UpdatePanel ID="upPharmacist" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Panel ID="pnPharmacist" runat="server" Width="100%" Visible="false">
<table style="width: 100%;">
<tr>
<td align="left" colspan="2" bgcolor="#eeeeee">
Pharmacist Information</td>
</tr>
<tr>
<td class="wizardLeftColumn">
Address 1:</td>
<td class="wizardRightColumn">
<asp:TextBox ID="tbAddress1" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td class="wizardLeftColumn">
Address 2:</td>
<td class="wizardRightColumn">
<asp:TextBox ID="tbAddress2" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td class="wizardLeftColumn">
State:
</td>
<td class="wizardRightColumn">
<asp:DropDownList ID="ddState" runat="server">
</asp:DropDownList>
</td>
</tr>
<tr>
<td class="wizardLeftColumn">
Zip:
</td>
<td class="wizardRightColumn">
<asp:DropDownList ID="ddZip" runat="server">
</asp:DropDownList>
</td>
</tr>
<tr>
<td class="wizardLeftColumn">
City:</td>
<td class="wizardRightColumn">
<asp:TextBox ID="tbCity" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td class="wizardLeftColumn">
Phone 1:</td>
<td class="wizardRightColumn">
<asp:TextBox ID="tbPhone1" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td class="wizardLeftColumn">
Phone 2:</td>
<td class="wizardRightColumn">
<asp:TextBox ID="tbPhone2" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td class="wizardLeftColumn">
Fax:</td>
<td class="wizardRightColumn">
<asp:TextBox ID="tbFax" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td class="wizardLeftColumn">
Provider Type:</td>
<td class="wizardRightColumn">
<asp:DropDownList ID="ddProviderTypes" runat="server" DataSourceID="odsProviderTypes"
DataTextField="TypeDescription" DataValueField="TypeCode">
</asp:DropDownList>
</td>
</tr>
<tr>
<td class="wizardLeftColumn">
Medicaid Provider Id:</td>
<td class="wizardRightColumn">
<asp:TextBox ID="tbMedicaidId" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td class="wizardLeftColumn">
County:</td>
<td class="wizardRightColumn">
<asp:TextBox ID="tbCounty" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td class="wizardLeftColumn">
DUR Region:</td>
<td class="wizardRightColumn">
<asp:TextBox ID="tbDURRegion" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td class="wizardLeftColumn">
License Number:</td>
<td class="wizardRightColumn">
<asp:TextBox ID="tbLicenseNumber" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td class="wizardLeftColumn">
License State:</td>
<td class="wizardRightColumn">
<asp:DropDownList ID="ddLicenseState" runat="server">
</asp:DropDownList>
</td>
</tr>
<tr>
<td class="wizardLeftColumn">
NPI:</td>
<td class="wizardRightColumn">
<asp:TextBox ID="tbNPI" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td class="wizardLeftColumn">
EIN/SSN:</td>
<td class="wizardRightColumn">
<asp:TextBox ID="tbSSN" runat="server"></asp:TextBox>
</td>
</tr>
</table>
</asp:Panel>
<ajaxToolkit:CascadingDropDown ID="cddState" runat="server" TargetControlID="ddState"
Category="State" PromptText="Please select..." LoadingText="[Loading codes...]"
ServiceMethod="GetStates" ServicePath="Services/AjaxAccessService.asmx">
</ajaxToolkit:CascadingDropDown>
<ajaxToolkit:CascadingDropDown ID="cddZip" runat="server" TargetControlID="ddZip"
Category="Zip" PromptText="Please select..." LoadingText="[Loading codes...]"
ServiceMethod="GetZipCodes" ServicePath="Services/AjaxAccessService.asmx" ParentControlID="ddState">
</ajaxToolkit:CascadingDropDown>
<ajaxToolkit:ListSearchExtender ID="lseZip" runat="server" TargetControlID="ddZip"
PromptPosition="Bottom" BehaviorID="lseZip">
</ajaxToolkit:ListSearchExtender>
<ajaxToolkit:CascadingDropDown ID="ccdLicenseState" runat="server" TargetControlID="ddLicenseState"
Category="State" PromptText="Please select..." LoadingText="[Loading codes...]"
ServiceMethod="GetStates" ServicePath="Services/AjaxAccessService.asmx">
</ajaxToolkit:CascadingDropDown>
</ContentTemplate>
</aspajax:UpdatePanel>

Has no one else run into this problem? I was really hoping to use the ListSearchExtender in this manner.

Thanks,

Nick

No comments:

Post a Comment