Click here to Skip to main content
15,892,517 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
ASP.NET
<tr>
   <td>
      Date of Birth
   </td>
   <td colspan="2">
      <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
      <asp:TextBox ID="TextBox3" runat="server">
      <asp:ImageButton ID="ImageButton1" runat="server" Height="25px" 
         ImageUrl="~/images/calendal.jpg" Width="25px" />
      <br />
      <asp:RangeValidator runat="server" ID="RangeValidator1" Type="Date" ControlToValidate="TextBox3" MaximumValue='01/01/2000' MinimumValue="01/01/1990"
         ErrorMessage="Invalid Date" Display="Dynamic" />
      <asp:CalendarExtender ID="CalendarExtender1" runat="server" Format="dd/MM/yyyy" 
         PopupButtonID="ImageButton1" PopupPosition="BottomRight" 
         TargetControlID="TextBox3">
   </td>
</tr>
Posted
Updated 18-Dec-14 10:42am
v2

1 solution

XML
directly can't set the rage , but using the valitation control will do the same thing
try this...

<asp:rangevalidator id="RangeValidator1" runat="server" errormessage="RangeValidator" controltovalidate="TextBox3" minimumvalue="2007-08-01" maximumvalue="2007-08-31" type="Date"></asp:rangevalidator>
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900