如上题。
------解决方案--------------------------------------------------------
为你的button加上onclick事件
<input id= "txtValue " type= "text " />
<asp:button id= "btnSubmit " Text= "Submit "
OnClientClick= "if (document.getElementById( 'txtValue ').value != ' ') return true; else return false; " />
------解决方案--------------------------------------------------------
UseSubmitBehavior = "false "
------解决方案--------------------------------------------------------
OnClientClick= "if (document.getElementById( 'txtValue ').value != ' ') return true; else return false; "
------------------
function check()
{
if (document.getElementById( 'txtValue ').value != ' ') return true; else return false;
}
OnClientClick= "return check() "