Sunday, June 22, 2014

Regular expression to validate multiple Email IDs separated by comma

Today I am giving you a simple regular expression to validate multiple email IDs separated by comma. This is one of the very common expression we require during the application development.
Regular expression you may use for this purpose is,
^\s*((\s*[a-zA-Z0-9\._%-]+@[a-zA-Z0-9\.-]+\.[a-zA-Z]{2,4}\s*[,]{1}\s*){1,100}?)?([a-zA-Z0-9\._%-]+@[a-zA-Z0-9\.-]+\.[a-zA-Z]{2,4})\s*$
Below is the complete code for a sample asp.net page to validate multiple Email IDs

Monday, June 16, 2014

How to install ASP.NET MVC 5 in Visual Studio 2013 using NuGet Package Manager

Today I am sharing you a simple steps to install ASP.NET MVC 5 in your visual Studio 2013. I hope you are aware all templates and add on to visual Studio can be easily installed using NuGet package manager. If you are new to NuGet package manager then I would suggest you to read my earlier article “” 
Once you install the NuGet package manager then we will open the console to install the ASP.NET MVC 5 template.

Wednesday, June 4, 2014

How to get Month wise summary in MS SQL

One of the common query I used to see in Microsoft forum is “How to get month and year from a datetime column in SQL Server”, Since I saw this question today again I thought I will write small article about this.
Mostly we require this query when we generate reports. Month wise report or Month and Year wise report definitely require such kind of query.
We will directly jump on to the solution and the query.
First we will create a table with datetime field and two numeric columns to get the sum based on the month and year.