Regular Expression for Email Address validation in C#

Saturday, June 6th, 2009

The task at hand is to validate the Textbox in asp.net for a valid email address.
We can attach a RegularExpressionValidator to the text box with the following regular expression:
<asp:RegularExpressionValidator ValidationExpression="^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$" ID="rxpEmail" runat="server"
ErrorMessage="Email Address is not valid" Text="*" Display="Static" ControlToValidate="txtEmail"></asp:RegularExpressionValidator>
UPDATES
Well i searched the net for the standards of a valid email id and i came across [...] Read more »

Twitter from ASP.NET Application

Friday, May 15th, 2009

This post will throw a light on how we can update our status on Twitter from an asp.net application.
The task is pretty simple as we have libraries already available on the net.
I will be using twitterizer dll to perform the task.
The following are the steps to be followed:

Download the twitterizer dll from here.
Add the reference [...] Read more »

Save Asp.NET Session state in SQL Server

Tuesday, May 5th, 2009

Session states of the asp.net application can be easily saved into SQL Server using the following steps:

Change the settings in the web.config file.

In the database create the appropriate tables.It is done automatically wen we execute the exe aspnet_regsql.exe located at C:\WINDOWS\Microsoft.NET\Framework\v2.0. location Read more »

Adding Blogs to an asp.net application

Monday, April 27th, 2009

http://blogengine.codeplex.com/ Read more »