· 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>