G
Guest
I have a FormView with lots of field that have validators attached but none
of them are working. Most are RequiredFieldValidtors, some are Regex etc.
here's some of my code:
<asp:FormView ID="fvRegDetail" runat="server" DefaultMode="Edit"
DataKeyNames="RegistrantId" DataSourceID="odsRegistrant"
CssClass="waFormView" >
......
<EditItemTemplate>
<asp:TextBox ID="tbWArrival" Text='<%# Bind("WArrival")
%>' ReadOnly="false" runat="server" CssClass="waTextBox" MaxLength="6"
Width="64px"></asp:TextBox>
<asp:RequiredFieldValidator
ID="RequiredFieldValidator11" runat="server"
ErrorMessage="Arrival time is required"
ValidationGroup="regForm"
SetFocusOnError="true"
ControlToValidate="tbWArrival"><img src="~/images/bangs.gif" title="required"
/></asp:RequiredFieldValidator>
....
<asp:ValidationSummary ID="ValidationSummary1" runat="server"
ValidationGroup="regForm" ShowMessageBox="true" ShowSummary="false"
HeaderText="Please review the following errors:"/>
<asp:Button ID="UpdateButton" runat="server" CausesValidation="True"
CommandName="Update" Text="Update" ValidationGroup="RegForm">
</asp:Button>
</EditItemTemplate>
</asp:FormView>
Any ideas on why this isn't working would be appreciated
of them are working. Most are RequiredFieldValidtors, some are Regex etc.
here's some of my code:
<asp:FormView ID="fvRegDetail" runat="server" DefaultMode="Edit"
DataKeyNames="RegistrantId" DataSourceID="odsRegistrant"
CssClass="waFormView" >
......
<EditItemTemplate>
<asp:TextBox ID="tbWArrival" Text='<%# Bind("WArrival")
%>' ReadOnly="false" runat="server" CssClass="waTextBox" MaxLength="6"
Width="64px"></asp:TextBox>
<asp:RequiredFieldValidator
ID="RequiredFieldValidator11" runat="server"
ErrorMessage="Arrival time is required"
ValidationGroup="regForm"
SetFocusOnError="true"
ControlToValidate="tbWArrival"><img src="~/images/bangs.gif" title="required"
/></asp:RequiredFieldValidator>
....
<asp:ValidationSummary ID="ValidationSummary1" runat="server"
ValidationGroup="regForm" ShowMessageBox="true" ShowSummary="false"
HeaderText="Please review the following errors:"/>
<asp:Button ID="UpdateButton" runat="server" CausesValidation="True"
CommandName="Update" Text="Update" ValidationGroup="RegForm">
</asp:Button>
</EditItemTemplate>
</asp:FormView>
Any ideas on why this isn't working would be appreciated