因为你的服务器上的frameqwork版本和自己机器上的可能不同
解决方法:
在程序中执行以下以下判断就好了:  
 
if  (Page.IsVaild==true)  
{  
……  
}  
 

解决方案 »

  1.   

    若要使该属性返回  true,Page.Validators  属性中的所有验证服务器控件必须都验证成功。只有在已调用  Page.Validate  方法,或已在开始窗体处理的  ASP.NET  服务器控件的  OnServerClick  处理程序中将  CausesValidation  属性设置为  true  后才可以选中该属性。这些服务器控件包括  Button、HtmlButton、HtmlInputButton、HtmlInputImage、ImageButton  以及  LinkButton  类。  
     
    意思是如果你的  button  的  CausesValidation  =  true;  
    你只需要在  
    if  (Page.IsVaild==true)  
    {  
         //这里表示已经通过验证  
         //在这里处理你的提交过程代码……  
    }  
     
    如果  button  的  CausesValidation  =  false;  
    则加一句  
     
    Page.Validate();  
    if  (Page.IsVaild==true)  
    {  
         //这里表示已经通过验证  
         //在这里处理你的提交过程代码……  
    }  
     
     
      

  2.   

    在服务器根目录中是不是少了 wwwroot\aspnet_client\system_web\1_1_4322\WebUIValidation.js 才导致客户端验证控件无效?其中1_1_4322与.net framwork 的版本有关