2013-11-01 45 views
0

此代碼使用我的網站在asp.netC#開發.NET 4.0不建的Visual Studio 2012類型「System.Web.UI.Page」沒有名爲「的ClientIDMode」公共財產

代碼:

<%@ Page Title="" Language="C#" MasterPageFile="~/Master.master" ClientIDMode="Static" 
    AutoEventWireup="true" CodeFile="Mypage.aspx.cs" Inherits="info" %> 

然後我就開始構建頁面,我得到這個錯誤。

Error parsing attribute 'clientidmode': Type 'System.Web.UI.Page' does not 
have a public property named 'clientidmode'. 

任何想法都非常感謝。

回答

2

這聽起來像你的項目沒有針對.NET 4.0框架。您可能安裝了4.0,但請確認項目屬性表明您正在編譯完整的.Net 4.0+框架。您還需要確保該網站運行的應用程序池已設置爲.Net 4.0+框架。

Project Properties - Target Framework

相關問題