rangevalidator problem

  • Thread starter Thread starter Anton
  • Start date Start date
A

Anton

hi

asp.net 3.5

I have a problem with the rangevalidator below, it doesn't display any
error..
I entered 705 inside the txtWidth and now error message was displayed

what's wrong?


<asp:RangeValidator ID="rvalWidth" runat="server"
ControlToValidate="txtWidth"
MinimumValue="150"
MaximumValue="700" ValidationGroup="vgSize" EnableClientScript="false"
Type="Integer" SetFocusOnError="true"
ErrorMessage="Feil verdi">*
</asp:RangeValidator>
 
Anton said:
hi

asp.net 3.5

I have a problem with the rangevalidator below, it doesn't display any
error..
I entered 705 inside the txtWidth and now error message was displayed

what's wrong?


<asp:RangeValidator ID="rvalWidth" runat="server"
ControlToValidate="txtWidth"
MinimumValue="150"
MaximumValue="700" ValidationGroup="vgSize" EnableClientScript="false"
Type="Integer" SetFocusOnError="true"
ErrorMessage="Feil verdi">*
</asp:RangeValidator>

Hi,
Since You have disabled client side validation the error message will show
up only after postback.

-Zsolt
 
--------------------------------------------------
From: "Anton" <no_email>
Sent: Tuesday, September 08, 2009 5:08 PM
Newsgroups: microsoft.public.dotnet.framework.aspnet
Subject: Re: rangevalidator problem
but error isn't displayed event after postback

You should also check whether Page.IsValid=True after postback, before
executing any code that depends on the validation.
 
Back
Top