Validation Summary not populated when validator is triggered
Posted on 2005-05-02
I have a web page with about 15 datagrids on it (don't ask). Each datagrid resides in it's own DIV and these divs can be shown/hidden based on the button pushed. All of this works.
The datagrids themselves are fully functional, and allow the user to add/edit/delete records. All of this works.
I am now trying to add validation controls. So far, I've only tried one. Here is the HTML for the FooterTemplate (where I add new records), minus some extraneous formatting:
<asp:textbox id="add_SwitchQuantity" text='1' visible="false" width="25px" MaxLength="20" cssclass="DataGridInputControl" runat="server" />
<asp:RequiredFieldValidator id="add_SwitchQuantityValidate" ControlToValidate="add_SwitchQuantity" ErrorText="You must add the quantity" Text="You must add the quantity" Display="Dynamic" Runat="server"></asp:RequiredFieldValidator>
I also have a validation summary control. I've tried putting this both at the bottom of the page, and in the same div as the datagrid. Neither works.
<asp:validationsummary id="ValidationSummary1" runat="server"></asp:validationsummary>
The validator itself IS firing -- the in-line text appears just fine. However, I would like to remove the in-line text, and use only the validation summary. Does anyone have any suggestions?
Thanks in advance for your help!