using System; using System.IO; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing; using System.Drawing.Imaging; using System.Web; using System.Web.SessionState; using System. Web.ui; using system.web.ui.webcontrols; using system.web.ui.htmlcontrols;
A summary description of Namespace vildate {///
#Region Web Form Designer Generated CodeOverride Protected Void OnNit (Eventargs E) {//// Codegen: This call is required for the ASP.NET Web Form Designer. //Initializecomponent();Base.oninit (E);
///
public void ValidataCode (string str) {System.Drawing.Bitmap Img; Graphics g; MemoryStream ms; int gheight = str.Length * 11; Img = new Bitmap (gheight, 20); g = Graphics.FromImage (Img); SolidBrush SB = new solidbrush; font ft = new font ("arial", 10); g.drawstring (Str, FT, SB, 3, 3); ms = new memoryStream (); img.save (MS Imageformat.png); response.clearContent (); response.contenttype = "image / png"; response.binarywrite (ms.toarray ()); g.dispose (); img.dispose (); response.end () } public string rndnum = ""; random rnd = new random (); string vchar = "0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, S, D, F, G, H, J, K, L, Q, W, E, R, T, Y, U, I, O, P, Z, X, C, V, B, N, M, Q, W, E, R, T, Y, U, I, O, P, A, S, D, F, G, H, J, K, L, Z, X, C, V, B, N, M "; string [] vc = vchar.split (','); for (int K = 0; k Verification Code: TD>