Found a good article on how to debug ASP.NET applications..Here it goes
http://www.bluevisionsoftware.com/WebSite/TipsAndTricksDetails.aspx?Name=AspNetDebugging
Monday, January 29, 2007
Wednesday, January 24, 2007
Using a Regular Expression in the Code Behind page
I searched google for something like this but didn't find any...
So am posting the one which I made here..
Function IsValidEmail(ByVal strEmail As String) As Boolean
Dim RegExp As New Regex("\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*")
Return RegExp.IsMatch(strEmail)
End Function
Now on the respective event call the function like this..
Dim boolValid As Boolean
boolValid = IsValidEmail("rajesh@nurture3.com")
Response.Write(boolValid)
Cheers
Rajesh Sivaraman.
So am posting the one which I made here..
Function IsValidEmail(ByVal strEmail As String) As Boolean
Dim RegExp As New Regex("\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*")
Return RegExp.IsMatch(strEmail)
End Function
Now on the respective event call the function like this..
Dim boolValid As Boolean
boolValid = IsValidEmail("rajesh@nurture3.com")
Response.Write(boolValid)
Cheers
Rajesh Sivaraman.
Subscribe to:
Posts (Atom)