HtmlMeta.Scheme プロパティ
アセンブリ: System.Web (system.web.dll 内)

scheme 属性。

Scheme プロパティでは、表示される HTML <meta> 要素の scheme 属性を指定できます。scheme 属性は、メタデータ プロパティを解釈するための追加コンテキストをクライアント ブラウザや検索エンジンなどのユーザー エージェントに提供するために使用できます。

HtmlMeta コントロールを使用して、Web ページの HTML <meta> 要素を定義する方法を次のコード例に示します。2 つの <meta> タグが定義されています。1 つはページを説明するキーワードを示し、もう 1 つはページの作成日時を示します。Scheme プロパティは、日付関連の <meta> タグに使用され、ユーザー エージェントが日付値を読み取るのを支援します。
<%@ Page Language="VB" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <script runat="server"> Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) ' Create two instances of an HtmlMeta control. Dim hm1 As New HtmlMeta() Dim hm2 As New HtmlMeta() ' Get a reference to the page header element. Dim head As HtmlHead = Page.Header ' Define an HTML <meta> element that is useful for search engines. hm1.Name = "keywords" hm1.Content = "words that describe your web page" head.Controls.Add(hm1) ' Define an HTML <meta> element with a Scheme attribute. hm2.Name = "date" hm2.Content = DateTime.Now.ToString("yyyy-MM-dd") hm2.Scheme = "YYYY-MM-DD" head.Controls.Add(hm2) End Sub </script> <html > <head runat="server"> <title>HtmlMeta Example</title> </head> <body> <form runat="server"> <div> View the HTML source code of the page to see the two HTML meta elements added. </div> </form> </body> </html>
<%@ Page Language="C#" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <script runat="server"> protected void Page_Load(object sender, EventArgs e) { // Create two instances of an HtmlMeta control. HtmlMeta hm1 = new HtmlMeta(); HtmlMeta hm2 = new HtmlMeta(); // Get a reference to the page header element. HtmlHead head = (HtmlHead)Page.Header; // Define an HTML <meta> element that is useful for search engines. hm1.Name = "keywords"; hm1.Content = "words that describe your web page"; head.Controls.Add(hm1); // Define an HTML <meta> element with a Scheme attribute. hm2.Name = "date"; hm2.Content = DateTime.Now.ToString("yyyy-MM-dd"); hm2.Scheme = "YYYY-MM-DD"; head.Controls.Add(hm2); } </script> <html > <head runat="server"> <title>HtmlMeta Example</title> </head> <body> <form runat="server"> <div> View the HTML source code of the page to see the two HTML meta elements added. </div> </form> </body> </html>

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からHtmlMeta.Scheme プロパティを検索する場合は、下記のリンクをクリックしてください。

- HtmlMeta.Scheme プロパティのページへのリンク