Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/cmake/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Keyword 如何在页面中包含元关键字和元描述?_Keyword_Meta - Fatal编程技术网

Keyword 如何在页面中包含元关键字和元描述?

Keyword 如何在页面中包含元关键字和元描述?,keyword,meta,Keyword,Meta,我有以下代码: <%@ Page Title="Spam Filter, Free Exchange Spam Filter – Software to Stop Spam" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <asp:Content ID="Content1" ContentP

我有以下代码:

<%@ Page Title="Spam Filter, Free Exchange Spam Filter – Software to Stop Spam" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentBreadCrumb" Runat="Server">
    Welcome to > <a href="Default.aspx">Home</a>
</asp:Content>

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

您可以使用该控件。在.aspx文件中写入:

<asp:HtmlMeta ID="descriptionMeta" runat="server" />
<asp:HtmlMeta ID="keywordMeta" runat="server" />
this.descriptionMeta.Name = "description";
this.descriptionMeta.Content = "description of the page or whatever";
this.keywordMeta.Name = "keywords";
this.keywordMeta.Content = "some,keywords,and,things";