Regular expression to accept decimal up-to two places

0 comments

Regular expression to accept decimal up-to two places

^-?[0-9]{0,2}(\.[0-9]{1,2})?$|^-?(100)(\.[0]{1,2})?$

Strong password validation using regular expression

0 comments

This Regular expression is used to create strong password.

       It will allows to enter at-least  1 upper case letter.
       It will allows to enter at-least  1 lower case letter.
       It will allows to enter at-least  1 number or special character.
       It will allows to enter at-least 8 characters length.

Character Count Validation using Javascript

0 comments
This code allows you to enter only maximum characters.


<body>
    <form id="form1" runat="server">
    <div>
     <asp:TextBox ID="CharacterCountTextBox" TextMode="multiLine" MaxLength="100"
       runat="server"onkeyup="javascript:CharCounter(this.id);" 
       onblur="javascript:CharCounter(this.id);"></asp:TextBox>
     <asp:Label ID="MessageLabel" runat="server" Text="100 chars remaining">
     </asp:Label>
    </div>
 
    </form>
</body>

Word Counter using Javascript

1 comments

This code will work to count the words entered in the textbox.



<body>
    <form id="form1" runat="server">
    <div>
        <asp:TextBox ID="WordCountTextBox" TextMode="multiLine" MaxLength="100" 
          runat="server" onkeyup="javascript:WordCounter(this.id,'MessageLabel');"
          onblur="javascript:WordCounter(this.id,'MessageLabel');">
         </asp:TextBox>
        <asp:Label ID="MessageLabel" runat="server" Text="100 chars
        remaining"></asp:Label></div>
    </form>
</body>


Vikram Chandra Theme by BloggerThemes & NewWPThemes Sponsored by iBlogtoBlog