Asp tutorial. net Verification Code (without refreshing the verification code)
<% @ Page language = "c #" autoeventwireup = "true" codefile = "login. aspx. cs" inherits = "login" %>
<! Doctype html public "-// w3c // dtd xhtml 1.0 transitional // en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<Html xmlns = "http://www.w3.org/1999/xhtml">
<Head id = "head1" runat = "server">
<Title> No title page </title>
<Script type = "text/Webpage effects">
Function dofresh (){
Document. getelementbyid ("image1"). src = "verifycode. aspx ";
}
</Script>
</Head>
<Body>
<Form id = "form1" runat = "server">
<Div>
<Table>
<Tr>
<Td>
Verification Code: <asp: textbox id = "txtvalidatecode" runat = "server"> </asp: textbox>
</Td>
<Td>
<Asp: image id = "image1" runat = "server"/>
<A href = "javascript: dofresh ();"> Why Not? </A>
</Td>
</Tr>
<Tr>
<Td align = "center" colspan = "2">
<Br/>
<Asp: literal id = "literrormsg" runat = "server"> </asp: literal>
<Asp: button id = "btnsubmit" runat = "server" text = "OK" onclick = "btnsubmit_click"/>
</Td>
</Tr>
</Table>
</Div>
</Form>
</Body>
</Html>
1 2 3 4 5 6