Archive | RSS feed for this section

Some Regular Expressions for Validations

31 Dec



This regular expressions matches dates of the form XX/XX/YYYY where XX can be 1 or 2 digits long and YYYY is always 4 digits long.


4/1/2001 | 12/12/2001 | 55/5/3434

1/1/01 | 12 Jan 01 | 1-1-2001




Matches a string if it is a valid time in the format of HH:MM

02:04 | 16:56 | 23:59

02:00 PM | PM2:00 | 24:00

Matches | Name Surname | “b. blah”

name | name.”surname” |




This pattern allows standard e-mail addresses (e.g., sub domains (e.g., the new two- and four-letter domains (e.g. and and country codes (e.g. Also, this patter follows the Network Solutions standard length of 67 characters for top-level domains. The reason I allow numbers to be entered in the domain suffix is for future planning. If you do not want numbers to be able to be added as a domain suffix (e.g. user@domain.123), simply delete the last two occurrences of “\d”.
Matches | |
 Non-Matches | |


Enabling Multiple forms in ASP.NET

25 Mar

The ASP.NET Control/PostBack Architecture is excellent for most Web . However, there are a few limitations that can sometimes be quite significant.One of the most fundamental problems has been the restriction to one server Form. This is very annoying for me i tried different methods but none of them worked, finally i tried with the panels and worked perfectly. I’m sharing you steps for enabling multiple forms in a single page. This article is a review of solution to the problems:

Use Panels inside the form tags….

Sample Code

< id=”Form1″ method=”post” runat=”server”>
< id=”panel1″ runat=”server”>
< id=”Textbox2″ runat=”server”>Form1
< runat=”server” id=”Button1″ name=”Button1″ text=”Click to see Form2″>

< id=”panel2″ runat=”server” visible=”false”>
< id=”TextBox1″ runat=”server”>Form2
< runat=”server” id=”Button2″ name=”Button2″ text=”Click to see Form1″>

Just try it and give feedbacks…