牛腩新闻错误总结

      经过一段时间对牛腩新闻发布系统的制作,总算是完成了大部分的功能了。其中也出现了不少问题,比如:

牛腩新闻错误总结

      这个问题困扰了我很久,也在网上查询了许多内容,这个错误原因只要是因为VS2012的WebForm4.5开发中,很多控件默认是Enable了Unobtrusive ValidationMode的属性,但并未对其进行赋值,Programmer必须手动对其进行设置。如果不对该属性进行配置,将会产生Error。

      

    着了许多种方法,其中有三种比较简单易懂:

   第一种:降低Framework的版本。

   在Web.config里,修改前的代码。

  <system.web>
    <compilation debug="false" targetFramework="4.5" />
    <httpRuntime targetFramework="4.5" />
  </system.web>

   修改后的代码

  <system.web>
    <compilation debug="false" targetFramework="4.0" />
  </system.web>


    第二种:设置Unobtrusive ValiationMode的类型   

    在Web.config里,修改前的代码。

    <system.web>

      <compilation debug="false" targetFramework="4.5" />

      <httpRuntime targetFramework="4.5" />

    </system.web>

   修改后的代码

   <system.web>

      <compilation debug="false" targetFramework="4.5" />

      <httpRuntime targetFramework="4.5" />

   </system.web>

   <appSettings>

      <add key="ValidationSettings:UnobtrusiveValidationMode" value="None"/>


   第三种:找到相应的Jquery文件,复制到U层的Bin文件下。

    可以在百度查到dll文件,进行下载。


    总结:每一个问题都是让我们不断提高的过程,我们要珍惜这些错误,出现错误不可怕,要多查,多总结,在错误中成长。