|
-
Apr 21st, 2005, 03:35 AM
#1
Thread Starter
Junior Member
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
-
Apr 21st, 2005, 04:56 AM
#2
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|