[Mono-list] validators does not work

Daniel Soto daniel.soto2k at gmail.com
Tue Nov 20 16:52:01 EST 2007


Hi.

Here a sample of my aspx code:

<asp:TextBox runat="server" id="minimo" visible="false" text="0"/>
<asp:TextBox class="caja_texto" ID="txtValorTotal" runat="server" ReadOnly
="true" Width="115px">0</asp:TextBox>
<asp:comparevalidator runat="server" id="comp1"
controltovalidate="txtValorTotal"
controltocompare="minimo" operation="GreaterThan" type="Integer"
errormessage="You must enter a value greater than zero" display="dynamic"
validationgroup="Grupo5">(*)</asp:comparevalidator>

The validation group is called in Button_click event

Page.Validate("Grupo5");

if (Page.IsValid).....

Best regards.



2007/11/20, Daniel Nauck <dna at informatik.uni-kiel.de>:
>
> Hello,
>
> the validator controls works very well for me.
> Please create a small testcase that shows your problems.
>
> Thanks.
>
> Daniel
>
> Daniel Soto schrieb:
> > Hi list.
> >
> > i have a problem with rangevalidators and comparevalidators. Appear as
> > if they not work.
> >
> > With rangevalidator, and when i set values in minvalue and maxvalue
> > properties of the rangevalidator, i obtain the error:
> >
> > HTTP 500. System.Web.HttpException: Minimum value cannot be converterd
> > to type Integer
> >
> > I test with other types, currency, double or integer, always i get the
> > same error. This runs fine in ms.net.
> >
> > Also, with comparevalidator, i set the controltocompare or
> > valuetocompare to an id of control, or a value, but the validation
> > always return false, still when the values are in order, for example, in
> > the compare validator i set valuetocompare to "0", operation as
> > "greaterthan" and type="currency" or any. After, i type a value greather
> > than zero in the control to validate, and the validation not pass.
> >
> > The customvalidator works fine.
> >
> > Both behaviors are bugs? Anybody can help me?
> >
> > Regards.
> > _______________________________________________
> > Mono-list maillist  -  Mono-list at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20071120/233beae0/attachment.html 


More information about the Mono-list mailing list