This documentation is archived and is not being maintained.

HtmlImage Class

Provides programmatic access for the HTML <img> element on the server.

Namespace: System.Web.UI.HtmlControls
Assembly: System.Web (in system.web.dll)

public ref class HtmlImage : public HtmlControl
public class HtmlImage extends HtmlControl
public class HtmlImage extends HtmlControl

Use this control to display an image on a Web page. The HtmlImage control can be programmatically manipulated to change the image displayed, the image size, and the alignment of the image relative to other page elements.

For a list of initial property values for an instance of HtmlImage, see the HtmlImage constructor.

The following code example demonstrates how to programmatically modify the properties of an HtmlImage control when an HtmlButton is clicked.

No code example is currently available or this language may not be supported.

  • AspNetHostingPermission  for operating in a hosted environment. Demand value: LinkDemand; Permission value: Minimal.
  • AspNetHostingPermission  for operating in a hosted environment. Demand value: InheritanceDemand; Permission value: Minimal.

System.Object
   System.Web.UI.Control
     System.Web.UI.HtmlControls.HtmlControl
      System.Web.UI.HtmlControls.HtmlImage

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

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

.NET Framework

Supported in: 2.0, 1.1, 1.0
Show: