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) 網站產生的評等標籤。

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

備註

Internet Content Selection (PICS) 平臺是適用于內容標籤的 W3C (W3C) 標準。 PICS 基本上是建立評等系統的語言。

任何值都可以是 PICS 標籤;ASP.NET 不會驗證標籤。 字串的最大長度是 255 個字元。 如需 PICS 標準和語法的詳細資訊,請參閱 World Wide Web Consortium 網站。

適用於