0

此代码未构建在我使用Visual Studio 2012使用.net 4.0在asp.netc#中开发的网站中

代码:

<%@ 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'.

对此的任何想法都将受到高度赞赏。

4

1 回答 1

2

It sounds like your project is not targeting the .NET 4.0 framework. You may have 4.0 installed, but please verify that the project properties indicate that you're compiling against the full .Net 4.0+ framework. You'll also want to make sure that the App Pool that the site is running under is setup for the .Net 4.0+ framework.

Project Properties - Target Framework

于 2014-03-24T21:54:03.620 回答