asp.net 点击提交按扭后,若所有文本框的值为空先刷新验证码,再提示文本框不能为空,怎么弄 5
后台验证码:voidtest(){char[]constant={'0','1','2','3','4','5','6','7','8','9'};StringBuild...
后台验证码:
void test()
{
char[] constant = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' };
StringBuilder ascii = new StringBuilder();
Random random = new Random();
for (int i = 0; i < 6; i++)
{
ascii.Append(constant[random.Next(10)]);
}
lblErro.Text = ascii.ToString();
} 展开
void test()
{
char[] constant = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' };
StringBuilder ascii = new StringBuilder();
Random random = new Random();
for (int i = 0; i < 6; i++)
{
ascii.Append(constant[random.Next(10)]);
}
lblErro.Text = ascii.ToString();
} 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询