views:

114

answers:

1

Hello all,

I am building a small web application in c#. I am using the range validator and I want to bind it to an html control that has the runat="server" attribute to it.

From some reason it won't bind and won't perform any check for the content of the control. Does any of you have an idea what to do?

+1  A: 

Based on this link from MSDN it should work

    <td>
       <asp:RangeValidator id="id" runat="server" ErrorMessage="not 2"
       ControlToValidate="txtbx_value" MaximumValue="3" MinimumValue="1" 
       Type="Integer"> </asp:RangeValidator>
    </td>
    <td>User ID:</td>
    <td><input type=text runat=server id=txtbx_value></td>
cgreeno