Showing posts with label Validation. Show all posts
Showing posts with label Validation. Show all posts
Hi, In this post i describe that how to select the particular valid date from calendar extendar user
not allow to enter invalid date.
For That you have to just use the some ajax control like following way.
before use you have to register the ajax toolkit and put the tool script manager in your code.
<asp:TextBox ID="txtbx_registrationdate" runat="server" CssClass="textbox" TabIndex="11"></asp:TextBox>
<asp:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtbx_registrationdate"></asp:CalendarExtender>
not allow to enter invalid date.
For That you have to just use the some ajax control like following way.
before use you have to register the ajax toolkit and put the tool script manager in your code.
<asp:TextBox ID="txtbx_registrationdate" runat="server" CssClass="textbox" TabIndex="11"></asp:TextBox>
<asp:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtbx_registrationdate"></asp:CalendarExtender>
Hi, In this post I mentioned that how to allow insert only numeric or float value in textbox. For doing this you have to just put the compare validate control and set the property and you work is done.
First take one text box and then take compartmentalize and set its property as follow.
<asp:TextBox ID="txtbx_issuedqty1" runat="server"></asp:TextBox>
<asp:CompareValidator ID="Cmp1" runat="server" ErrorMessage="Enter Valid Quantity" Type="Double" Operator="DataTypeCheck" ControlToValidate="txtbx_issuedqty1" ForeColor="Red" ValidationGroup="add">*</asp:CompareValidator>
Hope it will help you.
<asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server"
ErrorMessage="Enter
valid website URL" ControlToValidate="TextBox5" ValidationGroup="val1" ValidationExpression="(http|https)://([\w-]+\.)+[\w-]+(/[\w-
./?%&=]*)?"></asp:RegularExpressionValidator>
<asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server"
ErrorMessage="Email
Require" ControlToValidate="TextBox1" ValidationGroup="val1" Text="*"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server"
ErrorMessage="Enter
valid description" ControlToValidate="TextBox1" ValidationExpression="[0-9]+" ValidationGroup="val1"></asp:RegularExpressionValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server"
ErrorMessage="Enter
valid description" ControlToValidate="TextBox1" ValidationExpression="[a-zA-Z ]+" ValidationGroup="val1"></asp:RegularExpressionValidator>
