Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Problem w/ RangeValidation

Reply
Thread Tools

Problem w/ RangeValidation

 
 
charliewest
Guest
Posts: n/a
 
      01-20-2005
I've configured a RangeValidator control on a WebForm, and
have set the base-compare-validator-type to string, the max value to 100,
and min value to 1 (assuming that this will ensure that the string length is
between 1 and 100). However, the control to validate always throws an error,
regardless of the
length of the string. For example...

<asp:textbox id="txtQuestion" runat="server" Width="400px" MaxLength="100"
Height="50px" TextMode="MultiLine" CssClass="text1"></asp:textbox>

<asp:RangeValidator id="RangeValidatorQuestion1" runat="server"
ControlToValidate="txtQuestion" ErrorMessage="Question length cannot exceed
100 characters." MinimumValue="1" MaximumValue="100">*</asp:RangeValidator>

<asp:Button id="btnSubmit" runat="server" Text="Button"
CausesValidation="true"></asp:Button>

Is the RangeValidator unable to validate string lengths? And, i assume that
since the textbox's textmode is set to multiline, that the maxlength property
is disabled?

Thanks,
 
Reply With Quote
 
 
 
Reply

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
Problem problem problem :( Need Help Mike ASP General 2 05-11-2004 08:36 AM
Dynamically build RangeValidation control for text box Ibrahim Shameeque ASP .Net Building Controls 0 12-12-2003 01:27 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57