c# - Visual Web Developer 2010 Express - 创建面向 .NET 2.0 的 ASP.NET 网站

标签 c# asp.net .net visual-studio-2010

当我执行"file"->“新建网站”并选择 C# ASP.NET 项目时 - 它会创建一个包含 About.aspx、Default.aspx 等的基本项目。这构建良好。但是,当我获得网站-> 开始选项并选择目标框架作为 .NET 2.0 时,该项目不再编译。

这些是我得到的错误

WebSite2\Account\Register.aspx(8): Build (page): Type 'System.Web.UI.WebControls.CreateUserWizard' does not have a public property named 'LayoutTemplate'.
WebSite2\Account\Register.aspx(9): Build (page): Type 'System.Web.UI.WebControls.CreateUserWizard' does not have a public property named 'PlaceHolder'.
WebSite2\Account\Register.aspx(10): Build (page): Type 'System.Web.UI.WebControls.CreateUserWizard' does not have a public property named 'PlaceHolder'.
WebSite2\Account\Register.aspx(9): Build (page): Content ('</asp:PlaceHolder>              </asp:PlaceHolder>          </LayoutTemplate>') does not match any properties within a 'System.Web.UI.WebControls.CreateUserWizard', make sure it is well-formed.
WebSite2\Site.master.cs(3,14): error CS0234: The type or namespace name 'Linq' does not exist in the namespace 'System' (are you missing an assembly reference?)

有没有一种方法可以创建与 .NET 2.0 一起使用的默认非空项目?

My Dialog

最佳答案

按照以下步骤:-

enter image description here

enter image description here

你可以评论

using System.Linq;  (from all .cs pages)


(来自 Register.aspx 页面)

 <LayoutTemplate>
            <asp:PlaceHolder ID="wizardStepPlaceholder" runat="server"></asp:PlaceHolder>
            <asp:PlaceHolder ID="navigationPlaceholder" runat="server"></asp:PlaceHolder>
        </LayoutTemplate>

然后尝试构建。

关于c# - Visual Web Developer 2010 Express - 创建面向 .NET 2.0 的 ASP.NET 网站,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18079539/

相关文章:

c# - VLC 命令行 - 转码

c# - IdentityServer3 和外部通过 OpenIDConnect 登录

asp.net - NHibernate一对多删除不级联

c# - 从数据库中转换空日期时间值?

C# 检查文本文件是否有内容

asp.net - 完全禁用 Web 应用程序的 View 状态

javascript - 从 .aspx.cs 页面访问一个变量值(在循环中)到 javascript

C# .Net Write plug-ins for windows live writer 无法加载我的插件

.net - 依赖注入(inject)和服务定位

c# - 使用 JavaScriptSerializer 将实体映射到 JSON