必须添加对程序集"System.Core"的引用

在项目下的web.config中添加

 <compilation  debug="true" targetFramework="4.0">
      <assemblies>
        <add assembly="System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
      </assemblies>
    </compilation>

记得千万不是视图下的web.config

猜你喜欢

转载自www.cnblogs.com/liangliping/p/9140672.html