HttpResponse.Pics(String) メソッド

定義

HTTP PICS-Label ヘッダーを出力ストリームに追加します。

public:
 void Pics(System::String ^ value);
public void Pics (string value);
member this.Pics : string -> unit
Public Sub Pics (value As String)

パラメーター

value
String

PICS-Label ヘッダーに追加する文字列。

次の例は、画像を表示する ASP.NET ページです。 ページ コードはメソッドを Pics 呼び出して、応答の HTTP PICS-Label ヘッダーを設定します。 メソッドにパラメーター Pics として渡される文字列は、インターネット コンテンツ評価協会 (ICRA) Web サイトから生成された評価ラベルを表します。

<%@ 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">

    // When this page is loaded, the Pics method
    // sets the PICS-Label header for the response.
    private void Page_Load(object sender, EventArgs e)
    {
        Response.Pics( 
          "(pics-1.1 <http://www.icra.org/ratingsv02.html> " + 
          "comment <ICRAonline EN v2.0> " + 
          "l r (nz 1 vz 1 lz 1 oz 1 cz 1) " + 
          "<http://www.rsac.org/ratingsv01.html> " +
          " l r (n 0 s 0 v 0 l 0))");
    }

</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>ASP.NET Example</title>
</head>
<body>
    <form id="form1" runat="server">
        <img height="75%" src="animated.gif" width="100%" alt="An animated GIF"/>
    </form>
</body>
</html>
<%@ 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">

    ' When this page is loaded, the Pics method
    ' sets the PICS-Label header for the response.    
    Private Sub Page_Load(sender As Object, e As EventArgs)       
        Response.PICS( _
          "(pics-1.1 <http://www.icra.org/ratingsv02.html> " & _
          "comment <ICRAonline EN v2.0> " & _
          "l r (nz 1 vz 1 lz 1 oz 1 cz 1) " & _
          "<http://www.rsac.org/ratingsv01.html> " & _
          "l r (n 0 s 0 v 0 l 0))")
    End Sub

</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>ASP.NET Example</title>
</head>
<body>
    <form id="form1" runat="server">
        <img height="75%" src="animated.gif" width="100%" alt="An animated GIF"/>
    </form>
</body>
</html>

注釈

インターネット コンテンツ選択プラットフォーム (PICS) は、コンテンツラベル付けの World Wide Web Consortium (W3C) 標準です。 PICS は、基本的にレーティング システムを作成するための言語です。

任意の値に PICS ラベルを指定できます。ASP.NET はラベルを検証しません。 文字列の最大長は 255 文字です。 PICS の標準と構文の詳細については、 World Wide Web Consortium の Web サイトを参照してください。

適用対象