NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

HtmlImage Class

The HtmlImage class defines the methods, properties, and events for the HtmlImage server control. This class provides programmatic access on the server to the HTML <img> element.

Object
   Control
      HtmlControl
         HtmlImage

[Visual Basic]
Public Class HtmlImage
   Inherits HtmlControl
[C#]
public class HtmlImage : HtmlControl
[C++]
public __gc class HtmlImage : public HtmlControl
[JScript]
public class HtmlImage extends HtmlControl

Remarks

[To be supplied.]

Requirements

Namespace: System.Web.UI.HtmlControls

Assembly: System.Web.dll

Example [Visual Basic]

The following example demonstrates how developers can dynamically modify attributes on an HtmlImage control when the control is first loaded as a Web page.

[Visual Basic]

<html>
   <script language="VB" runat=server>
 
      Overrides Sub Load()
 
         ' Dynamically set image attributes on initial page load        

 
         If (IsFirstLoad =true) Then
MyImage.src = "myimage.jpg"
MyImage.Width = "60%"
MyImage.Height = "60%"
         End If
 
      End Sub
 
   </script>
 
   <body>
         <form method=post runat=server>
 
      Here is your picture: <img id="MyImage" runat=server/>
 
         </form>
      </body>
</html>

See Also

HtmlImage Members | System.Web.UI.HtmlControls Namespace | HtmlContainerControl