HttpResponse.Pics(String) HttpResponse.Pics(String) HttpResponse.Pics(String) HttpResponse.Pics(String) Method

定义

将一个 HTTP PICS-Label 标头追加到输出流。Appends a HTTP PICS-Label header to the output stream.

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

参数

value
String String String String

要添加到 PICS-Label 标头的字符串。The string to add to the PICS-Label header.

示例

下面的示例是一个显示图像的 ASP.NET 页面。The following example is an ASP.NET page that displays an image. 页面代码会调用Pics方法,以设置响应的 HTTP PICS-Label标头。The page code calls the Pics method to set the HTTP PICS-Label header for the response. 作为参数Pics传递给方法的字符串表示从 Internet 内容分级关联(ICRA)网站生成的评级标签。The string that is passed as the parameter to the Pics method represents a rating label generated from the Internet Content Rating Association (ICRA) Web site.

<%@ 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 内容选择(图片)的平台是用于标记内容的万维网联合会(W3C)标准。Platform for Internet Content Selection (PICS) is a World Wide Web Consortium (W3C) standard for content labeling. 图片实质上是一种用于创建分级系统的语言。PICS is essentially a language for creating a ratings system.

任何值都可以是图片标签;ASP.NET 不会验证标签。Any value can be a PICS label; ASP.NET does not validate the label. 字符串的最大长度为255个字符。The maximum length of the string is 255 characters. 有关图片标准和语法的详细信息,请参阅万维网联合会网站。For more information about PICS standards and syntax, see the World Wide Web Consortium Web site.

适用于