My main page has the content owner in the main tag.
Since I want the page title to display the function of the current page, and because I want the title to be translated into a custom language, I added the title tag as the owner of the page content. All are funny and good, except that now a second empty title tag appears, which is not true.
Any ideas how to solve this?
, , , . , . , runat = "server", false:
<title visible="false" runat="server"><%-- hack to turn the auto title off --%></title>
W3C:
HTML TITLE HEAD.
, ASP.Net , - , .
ASP.Net :
ASP.Net MVC, Site.Master :
<title><%= Html.Encode(ViewData["Title"]) %></title>
:
ViewData["Title"] = "Home";
, .
, HeadContent CSS.
,
@Page Title . .
.
, ASP.NET MasterPages. ASP.NET MVC.
runat = "server" masterpages
, - attritube :
<%@ Page Title="PAGE NAME HERE" Language="C#" MasterPageFile="~/Controls/MasterPage/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %>
page_load
Page.Title = "Your page title"