0
的ASP.NET Web表單項目有一些默認的頁面(「關於」和「聯繫」是特定的),有該類型的內容:爲什麼添加的網頁表單與默認表單不同?
<%@ Page Title="About" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeFile="About.aspx.cs" Inherits="About" %>
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
<h2><%: Title %>.</h2>
<h3>Your application description page.</h3>
<p>Use this area to provide additional information.</p>
</asp:Content>
然而,當你選擇添加> Web窗體,它創建這:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DuckbilledPlatypus.aspx.cs" Inherits="DuckbilledPlatypus" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>
爲什麼差異/不一致?注意:這是在Visual Studio 2013中;我不積極其他版本是相同的。