Hi you can do as below to get validation.
In Aspx page
<tr>
<td>
<asp:TextBox ID="txtvalue" runat="server"></asp:TextBox>
<asp:RangeValidator ID="Rvalid" runat="server"
ControlToValidate="txtvalue" ValidationGroup="Submit" ErrorMessage="your message"></asp:RangeValidator>
</td>
</tr>
<tr>
<td>
<asp:Button ID="buttonclick"
ValidationGroup="Submit" runat="server" Text="Submit"
onclick="buttonclick_Click" />
</td>
</tr>
In CS page on page load
protected void Page_Load(object sender, EventArgs e)
{
Rvalid.MinimumValue = DateTime.Now.Date.ToString("MM-dd-yyyy");
Rvalid.MaximumValue =
DateTime.Now.Date.AddDays(30).ToString("MM-dd-yyyy");
}
Hope this will help you.... :)
Thanks
Naveen