Hello everyone,
I really enjoy working with the Controls Tookit. The ValidatorCallout is especially nice to use. I'm trying to use a drop-down list to cause a partial postback in an updatepanel. When the ddl selectionchanges, it is supposed to pull database information and then populate some textfields. These textfields have been wrapped in sometimes all three of the extenders listed above. When I change the selection on the ddl, I get a Javascript error:
Line: 5909 Char: 12 Sys.ArgumentUndefinedException: value cannot be undefined. Parameter name: id.
I know this is in one of the javascript files that get attached to my code when it gets built. I'm trying to figure out what's the root cause. Do you think the page is trying to validate the empty textfields? The validatorcallouts are not firing, if that is the case. I've attached my aspx code. Let me know if the code-behind would be useful as well.
Thanks for any help you can provide.
<asp:ScriptManager runat="server" ID="smModify" /> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <table> <tr> <td colspan="3" style="font-size: x-large"><b>Common Fields</b></td> </tr> <tr> <td class="spacer"> </td> <td align="right">Branch Number:</td> <td> <asp:DropDownList ID="ddlSharedBranches" runat="server" AutoPostBack="True"> </asp:DropDownList><%--<asp:TextBox ID="txtBranchNumber" runat="server" MaxLength="5"></asp:TextBox> <ajax:FilteredTextBoxExtender ID="ftxteBranchNumber" runat="server" TargetControlID="txtBranchNumber" FilterType="Numbers"> </ajax:FilteredTextBoxExtender> <asp:RequiredFieldValidator ID="rfvBranchNumber" runat="server" display="none" ErrorMessage="Please enter data in the form #####." ControlToValidate="txtBranchNumber"></asp:RequiredFieldValidator> <ajax:ValidatorCalloutExtender ID="vceBranchNumber" runat="server" TargetControlID="rfvBranchNumber" HighlightCssClass="validateCallout"> </ajax:ValidatorCalloutExtender>--%> </td> </tr> <tr> <td class="spacer"> </td> <td align="right">Branch Name:</td> <td> <asp:TextBox ID="txtBranchName" runat="server" MaxLength="30"></asp:TextBox> <asp:RequiredFieldValidator ID="rfvBranchName" runat="server" display="none" ErrorMessage="Please enter the Branch's Name here." ControlToValidate="txtBranchName"></asp:RequiredFieldValidator> <ajax:ValidatorCalloutExtender ID="vceBranchName" runat="server" TargetControlID="rfvBranchName" HighlightCssClass="validateCallout"> </ajax:ValidatorCalloutExtender> </td> </tr> <tr> <td class="spacer"> </td> <td align="right">Bank:</td> <td> <asp:DropDownList ID="ddlBank" runat="server"> <asp:ListItem Text="Carolina First" Value="1"></asp:ListItem> <asp:ListItem Text="Mercantile Bank" Value="6"></asp:ListItem> </asp:DropDownList> </td> </tr> <tr> <td colspan="3"> <asp:CheckBox ID="cbTOSS" runat="server" AutoPostBack="true" />Modify TOSS Fields </td> </tr> <tr> <td colspan="3"> <asp:Panel ID="pnlTOSS" runat="server"> <table> <tr> <td colspan="3"><b>TOSS Specific Fields</b></td> </tr> <tr> <td class="spacer"> </td> <td align="right">Region:</td> <td> <asp:DropDownList ID="ddlAddBranchTOSSRegion" runat="server"> </asp:DropDownList> </td> </tr> <tr> <td class="spacer"> </td> <td align="right">Number of Tellers:</td> <td> <asp:TextBox ID="txtAddBranchTOSSNumTellers" runat="server" MaxLength="2"></asp:TextBox> <ajax:FilteredTextBoxExtender ID="ftxteAddBranchTOSSNumTellers" runat="server" TargetControlID="txtAddBranchTOSSNumTellers" FilterType="Numbers"> </ajax:FilteredTextBoxExtender> <asp:RequiredFieldValidator ID="rfvAddBranchTOSSNumTellers" runat="server" display="none" ErrorMessage="This field is required." ControlToValidate="txtAddBranchTOSSNumTellers"> </asp:RequiredFieldValidator> <ajax:ValidatorCalloutExtender ID="vceAddBranchTOSSNumTellers" runat="server" TargetControlID="rfvAddBranchTOSSNumTellers" HighlightCssClass="validateCallout"> </ajax:ValidatorCalloutExtender> </td> </tr> <tr> <td class="spacer"> </td> <td align="right">Sales FTE:</td> <td> <asp:TextBox ID="txtAddBranchTOSSSalesFTE" runat="server" MaxLength="7"></asp:TextBox> <ajax:FilteredTextBoxExtender ID="ftxteAddBranchTOSSSalesFTE" runat="server" TargetControlID="txtAddBranchTOSSSalesFTE" FilterType="Custom" ValidChars=".0123456789"> </ajax:FilteredTextBoxExtender> <asp:RequiredFieldValidator ID="rfvAddBranchTOSSSalesFTE" runat="server" display="none" ErrorMessage="This field is required." ControlToValidate="txtAddBranchTOSSSalesFTE"> </asp:RequiredFieldValidator> <ajax:ValidatorCalloutExtender ID="vceAddBranchTOSSSalesFTE" runat="server" TargetControlID="rfvAddBranchTOSSSalesFTE" HighlightCssClass="validateCallout"> </ajax:ValidatorCalloutExtender> </td> </tr> <tr> <td class="spacer"> </td> <td align="right">Effective Date:</td> <td> <asp:TextBox ID="txtAddBranchTOSSEffectiveDate" runat="server" MaxLength="10"> </asp:TextBox><asp:Image ID="imgCalendar" runat="server" ImageUrl="images/cldrimg.png" /> <ajax:FilteredTextBoxExtender ID="ftxteAddBranchTOSSEffectiveDate" runat="server" TargetControlID="txtAddBranchTOSSEffectiveDate" FilterType="custom" ValidChars="0123456789//"> </ajax:FilteredTextBoxExtender> <ajax:CalendarExtender ID="cldreAddBranchTOSSEffectiveDate" runat="server" TargetControlID="txtAddBranchTOSSEffectiveDate" Animated="true" PopupButtonID="imgCalendar"> </ajax:CalendarExtender> <asp:RequiredFieldValidator ID="rfvAddBranchTOSSEffectiveDate" runat="server" display="none" ErrorMessage="This field is required." ControlToValidate="txtAddBranchTOSSEffectiveDate"> </asp:RequiredFieldValidator> <ajax:ValidatorCalloutExtender ID="vceAddBranchTOSSEffectiveDate" runat="server" TargetControlID="rfvAddBranchTOSSEffectiveDate" HighlightCssClass="validateCallout"> </ajax:ValidatorCalloutExtender> </td> </tr> </table> </asp:Panel> </td> </tr> <tr> <td colspan="3"> <asp:CheckBox ID="cbTSFGu" runat="server" AutoPostBack="true" />Modify TSFGu Fields </td> </tr> <tr> <td colspan="3"> <asp:Panel ID="pnlTSFGu" runat="server"> <table> <tr> <td colspan="3"><b>TSFGu Specific Fields</b></td> </tr> <tr> <td class="spacer"> </td> <td align="right">Region:</td> <td> <asp:DropDownList ID="ddlAddBranchTSFGuRegion" runat="server"> </asp:DropDownList> </td> </tr> </table> </asp:Panel> </td> </tr> </table>
I was able to narrow it down to the ValidatorCallout causing the error.
I'm able to run the ddl one time to fill in the fields. It results in the error described above, but the fields fill in. If I try to select another branch from the dropdown list above, the error keeps the postback from going. So it's a one-shot deal, otherwise you have to reload.
Removing the updatepanel removes all of the errors and it works perfectly, but the tell-tale page flicker is back.
No comments:
Post a Comment