Asp tutorial. net call image Verification Code
Aspx page
<Html>
<Head>
<Title> Custom image </title>
<Meta name = "generator" content = "microsoft visual studio 7.0">
<Meta name = "code_language" content = "c #">
<Meta name = "vs_defaultclientscript" content = "webpage effect">
<Meta name = "vs_targetschema" content = "http://schemas.microsoft.com/intellisense/ie5">
</Head>
<Body>
<Form id = "courier image" method = "post" runat = "server">
</Form>
</Body>
</Html>
Place an img tag on the aspx page.
Cs and aspx code of custom image. aspx
Private void page_load (object sender, system. eventargs e)
{
// Captchaimage is used to generate verification codes. Ms has helped us well... Just call it.
Captchaimage ci = new captchaimage ("content to be displayed", 200, 50, "century schoolbook ");
This. response. clear ();
This. response. contenttype = "image/jpeg ";
// Write the image to the response stream in jpeg format.
Ci. image. save (this. response. outputstream, imageformat.jpeg );
Ci. dispose ();
}