// ASP .NET User Login Interface is often used to use the verification code code as follows
Private void page_load (object sender, system.eventargs e) {// Place user code here to initialize page label4.text = ranging} public string randomnum (int N) // {string string strchar = "0, 1, 2, 3, 4, 5, 6, 7, 8, 9 "; string [] vcarray = Strchar.Split (','); string vnum =" "; // Do not use StringBuilder because the string is short INT TEMP = -1; // Record the last random value, try to avoid a few of the same random number // use a simple algorithm to ensure the generation of different random rand = new random (); for (int I = 1; i DateTime.now.ticks));} // int T = rand.next (35); int T = rand.next (10); if (Temp! = -1 && temp == t) {Return rNDNUM (N) Temp = T; vnum = vcarray [T];} returnvnum; // Return to the generated random number} // 'function name: rNDNum //' function parameters: vcodenum - Settings Returns Returns strings Number // 'function function: generating random string of numbers and characters Private string rnDNum (int vcodenum) {string vchar = "0, 1, 2, 3, 4, 5, 6, 7, 8, 9 , A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, W, X, Y, Z "; String [] vcarray = vchar.split (", ". TOCHARRAY ()); // generates string string vnum =" "; int i; for (i = 1; i // Http://www.weste.net/2006/2-24/14492415770.html //