Results 1 to 2 of 2

Thread: javascript

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2005
    Posts
    31

    Lightbulb javascript

    HI
    I have very little experience with javascript but want to write some to allow me to ensure that an email field is filled in in my ASP.Net project form +that it contains an @ sign + allows no whitespace or odd characters like / or :
    I also need a current date to appear automatically
    would appreciate some help...
    thanks a million

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: javascript

    Here's one way, and I quote

    The RegularExpressionValidator Control
    The regular expression validator is one of the more powerful features of ASP.NET. Everyone loves regular expressions. Especially when you write those really big nasty ones... and then a few days later, look at it and say to yourself. What does this do?
    Again, the simple usage is:

    E-mail: <asp:textbox id="textbox1" runat="server"/>
    <asp:RegularExpressionValidator id="valRegEx" runat="server"
    ControlToValidate="textbox1"
    ValidationExpression=".*@.*\..*"
    ErrorMessage="* Your entry is not a valid e-mail address."
    display="dynamic">*
    </asp:RegularExpressionValidator>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width