Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. e-mail textbox validation in vb.net

e-mail textbox validation in vb.net

Scheduled Pinned Locked Moved Visual Basic
regexcsharptutorialquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    p_m_kanthi
    wrote on last edited by
    #1

    i have a function... but i dont know how do i call that function to validate e-mail text box.. can u please tell me the code... the function is as below.. please tell me how to call that.. and even where should i write the code to validate email textbox.. Imports System.Text.RegularExpressions Function EmailAddressCheck(ByVal emailAddress As String) As Boolean Dim pattern As String = "^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$" Dim emailAddressMatch As Match = Regex.Match(emailAddress, pattern) If emailAddressMatch.Success Then EmailAddressCheck = True Else EmailAddressCheck = False End If End Function

    C D 2 Replies Last reply
    0
    • P p_m_kanthi

      i have a function... but i dont know how do i call that function to validate e-mail text box.. can u please tell me the code... the function is as below.. please tell me how to call that.. and even where should i write the code to validate email textbox.. Imports System.Text.RegularExpressions Function EmailAddressCheck(ByVal emailAddress As String) As Boolean Dim pattern As String = "^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$" Dim emailAddressMatch As Match = Regex.Match(emailAddress, pattern) If emailAddressMatch.Success Then EmailAddressCheck = True Else EmailAddressCheck = False End If End Function

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Wow. What this tells me is that you're able to use google to find code, but don't have the most basic idea of what it does. I suggest reading a VB.NET book or two before you do anything else.

      Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )

      1 Reply Last reply
      0
      • P p_m_kanthi

        i have a function... but i dont know how do i call that function to validate e-mail text box.. can u please tell me the code... the function is as below.. please tell me how to call that.. and even where should i write the code to validate email textbox.. Imports System.Text.RegularExpressions Function EmailAddressCheck(ByVal emailAddress As String) As Boolean Dim pattern As String = "^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$" Dim emailAddressMatch As Match = Regex.Match(emailAddress, pattern) If emailAddressMatch.Success Then EmailAddressCheck = True Else EmailAddressCheck = False End If End Function

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #3

        p_m_kanthi wrote:

        can u please tell me the code...

        Why?? You already have the code. If you can't figure out how to call it, you're skills are in great need of improvement. What you want to do is pretty much in any introductory course to programming and in the first couple of chapters in any VB.NET beginners book. We could tell you how to do it, but you wouldn't understand the answer.

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007, 2008

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups