An image button control that reduces to an absolute minimum the size of the image transferred to the browser. Multiple image sources can be specified to reduce the adverse image of shrinking images.

ImageButton control inherits Microsoft's ImageButton documented here.

Namespace: FiftyOne.Framework.Mobile.Controls
Assembly: FiftyOne.Framework (in FiftyOne.Framework.dll) Version: 2.0.2.1 (2.0.2.1)

Syntax

C#
[ToolboxBitmapAttribute("FiftyOne.Framework.Mobile.Controls.ImageButton")]
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class ImageButton : ImageButton, 
	IImageControl, IImageButtonSize, IStyle, IUrlResolutionService, ICssIncludeGroup
Visual Basic
<ToolboxBitmapAttribute("FiftyOne.Framework.Mobile.Controls.ImageButton")> _
<AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
Public Class ImageButton _
	Inherits ImageButton _
	Implements IImageControl, IImageButtonSize, IStyle, IUrlResolutionService,  _
	ICssIncludeGroup
Visual C++
[ToolboxBitmapAttribute(L"FiftyOne.Framework.Mobile.Controls.ImageButton")]
[AspNetHostingPermissionAttribute(SecurityAction::InheritanceDemand, Level = AspNetHostingPermissionLevel::Minimal)]
public ref class ImageButton : public ImageButton, 
	IImageControl, IImageButtonSize, IStyle, IUrlResolutionService, ICssIncludeGroup

Examples

The following code example demonstrates how to create an ImageButton control that displays the coordinates at which an image is clicked.

CopyXML
<mob:ImageButton ID="ImageButton1" runat="server" ImageUrl="Images/Globe128.jpg"
CalculateSizeMode="ClientWidth" OnClick="ImageButton1_Click" >
    <mob:AltImage ImageUrl="~/Images/Globe48.jpg" />
    <mob:AltImage ImageUrl="~/Images/Globe72.png" />
    <mob:AltImage ImageUrl="~/Images/Globe24.gif" />
</mob:ImageButton>
<mob:Label id="Label1" runat="server" />
CopyC#
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{    
     Label1.Text = "You clicked the ImageButton control at the coordinates: (" + 
                  e.X.ToString() + ", " + e.Y.ToString() + ")";
}

Inheritance Hierarchy

System..::..Object
  System.Web.UI..::..Control
    System.Web.UI.WebControls..::..WebControl
      System.Web.UI.WebControls..::..Image
        System.Web.UI.WebControls..::..ImageButton
          FiftyOne.Framework.Mobile.Controls..::..ImageButton

See Also