生成4位随机验证码
//@ 2006 flyasm
Random newRandom=new Random();
txtRandom.Text="";
string tempRandom="";
for(int i=0;i<4;i++)
{
string t=Convert.ToInt16(9*a.NextDouble()).ToString();
code.Text+="<img src='images/random/"+t+".gif'>";
tempRandom+=t;
txtRandom.Text=tempRandom;
}
Session.Add("code",tempRandom);
浙公网安备 33010602011771号