用VS 2013做.NET 的时候出现的问题,在Page Load里面加上"UnobtrusiveValidationMode = UnobtrusiveValidationMode.None; "后,后面的if语句判断就好像没有用了,谁能帮我解释一下这个问题吗?
protected void Page_Load(object sender, EventArgs e)
{
UnobtrusiveValidationMode = UnobtrusiveValidationMode.None;
}
protected void Button1_Click(object sender, EventArgs e)
{
string inputvalue = Request.Form["yz"];
if (TextBox6.Text.Trim() == string.Empty )
{
Label1.Text = "";
}
else if (TextBox6.Text != inputvalue)
{
Label1.Text = "输入验证码有误";
}
else
{
Label1.Text = "输入正确";
}
}