Common Regular Expressions

PhoneNumber = @”^(\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4}))*$”; AnyPositiveInteger = @”^[0-9]*$”; AlphabeticalCharactersNoSpace = @”^[a-zA-Z]*$”; ZipCodeUseOnly = @”^(\d{5}-\d{4}|\d{5}|\d{9})$|^([a-zA-Z]\d[a-zA-Z] \d[a-zA-Z]\d)*$”; ZipCodeRequiredUseOnly = @”^(\d{5}-\d{4}|\d{5}|\d{9})$|^([a-zA-Z]\d[a-zA-Z] \d[a-zA-Z]\d)+$”; ValidStringWithSpace = @”^[a-zA-Z' ']+$”; AlphaNumeric = @”^[a-zA-Z0-9]+$”; EmailAddress = @”^([a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z](?:[a-zA-Z-]*[a-zA-Z])?\.)+[a-zA-Z]{3})+$”; WebsiteAddress = @”^(((http|https)\:\/\/)?[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(\/\S*)?)?$”; OptionalEmailAddress = @”^([a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z](?:[a-zA-Z-]*[a-zA-Z])?\.)+[a-zA-Z]{3})*$”; NullableValidStringWithSpecialCharacters = @”^([a-zA-Z' '.!#$%&'*+/=?^_`{|}~-])*$”; AmountValidator … Continue reading

More Galleries | Leave a comment

Selecting columns from multiple tables using LINQ

Lot of times we have need to fetch columns from multiple tables using LINQ. I have used following approach for the same – Happy Coding.

More Galleries | Leave a comment

ThreadAbortException Occurs If You Use Response.End, Response.Redirect, or Server.Transfer

http://support.microsoft.com/kb/312629/EN-US/

More Galleries | Leave a comment

Back Button issue after Logout in ASP.NET

http://geekswithblogs.net/Frez/articles/back-button-issue-after-logout-in-asp.net.aspx

More Galleries | Leave a comment

URL routing with asp.net 4.0

http://www.heartysoft.com/aspnet-routing-iis7-remember-modules http://www.britishdeveloper.co.uk/2010/06/dont-use-modules-runallmanagedmodulesfo.html

More Galleries | Leave a comment

Debugging AJAX WCF Service Using SvcTraceViewer.exe

You can use Microsoft Service Trace Viewer (SvcTraceViewer.exe) to help diagnose problems with connections to your WCF services. For example, if calling WCF service from the client using AJAX (or maybe AJAJ for JSON!) you might get a 500 Server … Continue reading

More Galleries | 1 Comment

Tip/Trick: Cool UI Templating Technique to use with ASP.NET AJAX for non-UpdatePanel scenarios

If you are trying to load data asynchronously similar to various popular web 2.0 apps like facebook, twitter then following post is for you – http://weblogs.asp.net/scottgu/archive/2006/10/22/Tip_2F00_Trick_3A00_-Cool-UI-Templating-Technique-to-use-with-ASP.NET-AJAX-for-non_2D00_UpdatePanel-scenarios.aspx

More Galleries | Leave a comment

Custom Activity Designer

Creating custom activities with Windows Workflow Foundation is easy, but creating a fully featured activity designer is not quite as easy.  In this episode, you will see the tips and tricks of creating an activity designer to get up and … Continue reading

More Galleries | Leave a comment

Disabling XML Comment warning in Workflow auto-generated code in .NET Framework 4.0

http://lvquoc.blogspot.com/2010/11/disable-xml-comment-warning-in-workflow.html

More Galleries | Leave a comment

Controlling asp.net page navigation using WF 4.0

coming soon……

Posted in Uncategorized | Leave a comment