次の方法で共有


HttpResponse.Pics メソッド

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

名前空間: System.Web
アセンブリ: System.Web (system.web.dll 内)

構文

'宣言
Public Sub Pics ( _
    value As String _
)
'使用
Dim instance As HttpResponse
Dim value As String

instance.Pics(value)
public void Pics (
    string value
)
public:
void Pics (
    String^ value
)
public void Pics (
    String value
)
public function Pics (
    value : String
)
適用できません。

パラメータ

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

解説

PICS (Platform for Internet Content Selection) は、コンテンツのラベリングに関する W3C (World Wide Web Consortium) の規格です。PICS は、基本的には規制システムを作成するための言語です。

どのような値でも PICS ラベルにできます。ASP.NET ではラベルを検証しません。文字列の最大長は 255 文字です。PICS の規格と構文の詳細については、W3C (World Wide Web Consortium) の Web サイト (http://www.w3c.org) を参照してください。

使用例

次のコード例は、イメージを表示する ASP.NET ページです。このページのコードは、Pics メソッドを呼び出して、応答の PICS-Label HTTP ヘッダーを設定します。Pics メソッドへのパラメータとして渡される String は、ICRA (Internet Content Rating Association) の Web サイトで生成されたレーティング ラベルを表します。

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

プラットフォーム

Windows 98,Windows Server 2000 SP4,Windows CE,Windows Millennium Edition,Windows Mobile for Pocket PC,Windows Mobile for Smartphone,Windows Server 2003,Windows XP Media Center Edition,Windows XP Professional x64 Edition,Windows XP SP2,Windows XP Starter Edition

Microsoft .NET Framework 3.0 は Windows Vista,Microsoft Windows XP SP2,および Windows Server 2003 SP1 でサポートされています。

バージョン情報

.NET Framework

サポート対象 : 3.0,2.0,1.1,1.0

参照

関連項目

HttpResponse クラス
HttpResponse メンバ
System.Web 名前空間