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!

HtmlInputImage Class

The HtmlInputImage class defines the methods, properties and events for the HtmlInputImage control. This class allows programmatic access to the HTML <input type= image> element on the server.

Object
   Control
      HtmlControl
         HtmlInputControl
            HtmlInputImage

[Visual Basic]
Public Class HtmlInputImage
   Inherits HtmlInputControl
   Implements IPostBackDataHandler, IPostBackEventHandler
[C#]
public class HtmlInputImage : HtmlInputControl,
   IPostBackDataHandler, IPostBackEventHandler
[C++]
public __gc class HtmlInputImage : public HtmlInputControl,
   IPostBackDataHandler, IPostBackEventHandler
[JScript]
public class HtmlInputImage extends HtmlInputControl,
   IPostBackDataHandler, IPostBackEventHandler

Remarks

Web developers can use the HtmlImputImage control to create customized UI buttons with actions can be handled on the server.

Note   Unlike <button> elements, all browsers support the HTML <input type=image> element.

Requirements

Namespace: System.Web.UI.HtmlControls

Assembly: System.Web.dll

Example [Visual Basic]

[Visual Basic]

<html>
     <script language="VB" runat=server>
        Sub SubmitBtn_Click(ByVal Source As Object, ByVal E as ImageClickEventArgs)
Message.InnerHtml = "The Submit Button was clicked!"
        End Sub

        Sub ClearBtn_Click(ByVal Source As Object, ByVal E as ImageClickEventArgs)
Message.InnerHtml = "The Clear Button was clicked!"
        End Sub
     </script>

     <body>
         <form method=post runat=server>
<input type=image src="submit.gif" OnServerClick="SubmitBtn_Click" runat=server>
<input type=image src="clear.gif" OnServerClick="ClearBtn_Click" runat=server>

<h1> <span id="Message" runat=server></span>
</h1>
     </body>
</html>

See Also

HtmlInputImage Members | System.Web.UI.HtmlControls Namespace