ASP. NET upgrade capability (2)

Source: Internet
Author: User

· Crystal translation · yesky

Here is an example of c #.

Verify user form input

Running Environment: Win2000 Advance Server + IIS5.0 + ngws sdk (80 m ).

<% @ Page Language = "C #" %>

<Html>
<Script language = "javascript">
Function ClientValidateEmail (source, value)
{
Var strr;
Re =/(w + @ w +. w +) (. {0, 1} w *) (. {0, 1} w *)/I;
Re.exe c (value );
If (RegExp. $3! = "" & RegExp. $3! = "." & RegExp. $2! = ".") Strr = RegExp. $1 + RegExp. $2 + RegExp. $3
Else
If (RegExp. $2! = "" & RegExp. $2! = ".") Strr = RegExp. $1 + RegExp. $2
Else strr = RegExp. $1
If (strr! = Value)
Return false;
Else
Return true;
}
</Script>
<Body>

<H3> ASP. NET user input verification

<Form method = post runat = server>
<Hr width = 600 size = 1 noshade>
<Table>
<Tr>
<Td>
<Asp: ValidationSummary ID = "valSum" runat = "server"
HeaderText = "you must enter the following form fields :"
DisplayMode = "bulletlist"
Font-Name = ""
Font-Size = "12"
/>
</Td>
</Tr>
</Table>
<Center>
<P>


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.