Export (0) Print
Expand All

HttpResponse.Pics Method

Appends a HTTP PICS-Label header to the output stream.

Namespace:  System.Web
Assembly:  System.Web (in System.Web.dll)

public void Pics(
	string value
)

Parameters

value
Type: System.String

The string to add to the PICS-Label header.

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.

Any value can be a PICS label; ASP.NET does not validate the label. 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.

The following example is an ASP.NET page that displays an image. The page code calls the Pics method to set the HTTP PICS-Label header for the response. 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>

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft