CutomValidator to validate email address ignoring space at the end in .NET

March 19, 2009 at 8:13 am (.NET, ASP.NET, Technical) (, , )

We have compare validator in .NET to Compare the value entered by the user in an input control with the value entered in another input control, or with a constant value. Click here explore more on CompareValidator.

I had a unique requirement to validate the Email address in the two controls ignoring space at the end. I explored more and found a solution using the CustomValidator. Click here explore more on CustomValidator.

I have mentioned the code below

Added the following CustomValidator in the page:

<asp:CustomValidator ID=”CompareEmailAddress” runat=”Server” ClientValidationFunction=”CompareEmailAddress” ErrorMessage=”*” EnableClientScript = “true” ></asp:CustomValidator>

Read the rest of this entry »


Permalink 1 Comment

DateDiff function in SQL Server

March 17, 2009 at 3:13 pm (SQL, Technical, Tips and Tricks) (, )

I frequently used to calculate date difference between two dates. I use to open the calendar and calculate the difference. But now I have found a easier way to calculate the date difference using the SQL DateDiff function

DateDiff returns the number of date and time boundaries crossed between two dates.


DateDiff(datepart, startdate, enddate)

Read the rest of this entry »

Permalink 4 Comments

Importing/Exporting mails from Thunderbird to Windows Live Messenger

March 17, 2009 at 2:46 pm (Softwares, Technical, Tools) (, , , )

I used mozilla thunderbird for nearly a year now as my Email client. But after the release of Windows Live Messenger, I used both concurrently and finally settled for Windows Live Messenger. I had stored nearly thousands of mails using Thunderbird and was bit worried on importing the mails from Thunderbird to Windows Live Messenger. Finally, I googled and found few solutions.

First I tried the following solution prescribed here. I downloaded Thunderbird add-on from and installed the add-on in Thinderbird. Then upon first try I found that I had to export all the folders one by one manually to eml format. I was bit tensed as I thought that the other solutions too could be quite similar.

Then I tried another solution mentioned here. It also mentioned about a add-on in Thunderbird namely SmartSave which can be used to export mails retaining the folder structure. It worked quite well for me. Please follow the instructions which is mentioned in the above link.

Permalink 1 Comment