M
merrittr
I have the following validator control:
<asp:RangeValidator ID="RangeValidator1" runat="server"
ControlToValidate="Purchase_Date"
ErrorMessage="Invalid Date" MaximumValue="1/01/2222"
MinimumValue="1/01/1970"></asp:RangeValidator>
I am trying to use it to validate a textbox in a form view however I
get the message:
Unable to find control id 'Purchase_Date' referenced by the
'ControlToValidate' property of 'RangeValidator1'
but as far as i can see I have the ID of the textbox?????
<asp:FormView ID="FormView1" runat="server"
DataSourceID="SqlDataSource1" DefaultMode="Insert" >
<asp:TextBox ID="Purchase_Date" runat="server" Text='<%#
Bind("Purchase_Date", "{0:d}") %>' ></asp:TextBox>
..
<asp:RangeValidator ID="RangeValidator1" runat="server"
ControlToValidate="Purchase_Date"
ErrorMessage="Invalid Date" MaximumValue="1/01/2222"
MinimumValue="1/01/1970"></asp:RangeValidator>
I am trying to use it to validate a textbox in a form view however I
get the message:
Unable to find control id 'Purchase_Date' referenced by the
'ControlToValidate' property of 'RangeValidator1'
but as far as i can see I have the ID of the textbox?????
<asp:FormView ID="FormView1" runat="server"
DataSourceID="SqlDataSource1" DefaultMode="Insert" >
<asp:TextBox ID="Purchase_Date" runat="server" Text='<%#
Bind("Purchase_Date", "{0:d}") %>' ></asp:TextBox>
..