我正在创建一个带有母版页的 Web 表单项目。但是,当我在母版页(或任何其他控件或 html 元素)上放置标签时,它不会在 Web 表单上显示它。我该如何解决这个问题?母版页:<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="MasterPage.master.cs" Inherits="RWA.MasterPage" %><!DOCTYPE html><html><head runat="server"><title></title><asp:ContentPlaceHolder ID="head" runat="server"></asp:ContentPlaceHolder></head><body><form id="form" runat="server"><div><asp:ContentPlaceHolder ID="MasterPagePlaceHolder" runat="server"><asp:Label ID="NameLabel" runat="server" Text="Label"></asp:Label> </asp:ContentPlaceHolder></div></form></body></html>网页表格:<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.Master" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="RWA.Login" %><asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"></asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="MasterPagePlaceHolder" runat="server"></asp:Content>
添加回答
举报
0/150
提交
取消