asp.net c# 使用 Masterpage 时每个 Webform 的不同标题

asp.net c# Different title for each Webform while using Masterpage

我刚刚上传了我的网站,但是一切正常。我刚刚意识到无论我在我的网站上的什么位置,它总是显示相同的标题("thiswebsite.com" 等,如果我没有在母版页上输入任何标题)并且如果我在母版页上输入标题然后, 当然。它只显示所说的标题。不管我在哪个页面。那么,我如何为每个网络表单为所述页面设置不同的标题?我以前从未真正这样做过。

这是我当前的主页"head"

<head runat="server">
    <title></title>
    <asp:ContentPlaceHolder id="head" runat="server">
    </asp:ContentPlaceHolder>
    <meta name="viewport" content="width=device-width,initial-scale=1, maximum-scale=1"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>

    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"/>
    <link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'/>
    <link href="StyleSheet.css" rel="stylesheet" />


</head>

这是来自同一项目的随机网络表单

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="omos.aspx.cs" Inherits="omos" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
</asp:Content>

如您所见,这里没有什么特别之处,只是使用 Bootstrap 时的普通头像和我的一个网络表单。我清空了所有内容的内容占位符,以使其更易于阅读。 如果您需要更多信息来回答问题,请告诉我。

泰卡

第二次我按下提问我现在意识到你可以更改网络表单顶部的标题,at " <%@ Page Title="" Language="C#" "直到现在才真正注意到它。为此表示歉意 !