日期:2014-05-17  浏览次数:20463 次

asp.net 发布后,前台验证失效
asp.net 源程序 部署到IIS后,,一切正常,,但发布后,,前台验证就失效了,,
<script type="text/javascript">
$(function(){
    $("#aspnetForm").Validform({
        datatype:{
            "fen":/^-?[1-9]\d{0,4}$/
        },    
    beforeSubmit:function(o){
        var flag=true;
        var TbName=$("#<%=TbName.ClientID %>").val();
        var DistrictID=$("#<%=DropDistrict.ClientID %>_DropDistrict").val(); 
        var Sort=$("#<%=DropSort.ClientID %>_DropSort").val();
        $.ajax({
        url: "../handler/VaApEvaStdExist.ashx",
        data: "Name=" + TbName+"&DistrictID=" + DistrictID+"&Sort=" + Sort,
        async: false,
        cache: false,
        type: "POST",
        success: function(data){
            if(data!="y"){
                $.Showmsg(data);
                flag=false;
            }
        }
    });
    return flag;
    }
});
})
</script>

------解决方案--------------------
引用:
asp.net 源程序 部署到IIS后,,一切正常,,但发布后,,前台验证就失效了,,
<script type="text/javascript">
$(function(){
    $("#aspnetForm").Validform({
        datatype:{
            "fen":/^-?[1-9]\d{0,4}$/
        },    
    beforeSubmit:function(o){
        var flag=true;
        var TbName=$("#<%=TbName.ClientID %>").val();
 &nb