Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Validators

Thread Tools


Jim Heavey
Posts: n/a
Hello I have a DataList control with a couple of text boxes and a couple of
RequiredField Validators and Regular Expression Validators, but they are
not doing anything.

When I blank out the value in the field, neither of the Required field
validators are posting an error. I set the "causesValidation" property on
the button to "true". What have I done incorrectly?

Here is the (abbreviate) HTML code....

<asp:TextBox ID="txtEditSeq" Runat="server" Text='<%#
DataBinder.Eval(Container.DataItem,"Sort_Order")%> ' Width="40px" >
<asp:RequiredFieldValidator ID="rqdfldSequence" Display="Dynamic"
ControlToValidate="txtEditSeq" ErrorMessage="Field Requires
ID="rglrSequence" Display="Dynamic"
ControlToValidate="txtEditSeq" ValidationExpression="[1-
ErrorMessage="Must be numeric and between 1 - 99">
<asp:TextBox Runat="server" ID="txtEditNarrative" Width="840px"
Height="80px" TextMode="MultiLine" Text='<%# DataBinder.Eval
(Container.DataItem, "Descrp") %>'>
<asp:RequiredFieldValidator ID="rqdfldEditNarrative"
Display="Dynamic" ControlToValidate="txtEditNarrative"
ErrorMessage="Field Requires Input">
Reply With Quote
Jim Heavey
Posts: n/a
I was missing Runat="server" and that was the reason they were not working
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Regular Expression validators NOT working, Required Field validators ARE working Ratman ASP .Net 0 09-14-2004 09:36 PM
Validators William F. Robertson, Jr. ASP .Net 0 07-10-2003 04:38 PM
Validators and javascript dmedina ASP .Net 1 06-30-2003 07:37 PM
All validators stopped working Marina ASP .Net 4 06-27-2003 08:34 PM
Re: Validators William F. Robertson, Jr. ASP .Net 0 06-25-2003 04:08 PM