Validation error

S

Simon

I have asp.net 2.0, vs2005 and c#:

In page there is one textBox and range validator for that textBox:
<asp:TextBox id="txtDuration" Runat="server" Columns="3"></asp:TextBox>

<asp:RangeValidator id="rngValDuration" Runat="server" ControlToValidate="txtDuration" Type="Integer"></asp:RangeValidator>

In code behind I set:

txtDuration.Text = "2";

When I start the page, I get the following error message:

The value '' of the MaximumValue property of 'rngValDuration' cannot be converted to type 'Integer'

I don't know why? It worked in asp.net 1.1

Any idea?

Thanks,Simon
 

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

Forum statistics

Threads
473,992
Messages
2,570,220
Members
46,805
Latest member
ClydeHeld1

Latest Threads

Top