Hi,
I am using this code to generate an image:
<%@ Page Language="C#" %>
<%@ import Namespace="System.Drawing.Imaging" %>
<%@ import Namespace="System.Drawing" %>
<%@ import Namespace="System.Drawing.Drawing2D" %>
<%@ import Namespace="System.Drawing.Text" %>
<html>
<head>
<script runat="server">
public void Page_Load(object Src, EventArgs E)
{
if (!IsPostBack) {
string strPathToImage = "captchaimg/captcha.gif";// Make sure the directory is writable by your web server!
string strText = fncDrawCaptcha(Server.MapPath(strPathToImage));
imgCaptcha.ImageUrl = strPathToImage;
Session["strText"] = strText;
}
}
public string fncDrawCaptcha(string path)
{
//*** Written by user CWA, CoolWebAwards.com Forums. 21 January 2010
//*** http:/ ...
Go to the complete details ...