rangevalidator problem

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>
 
M

miher

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
 
R

Riki

--------------------------------------------------
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top