Class wwWebImageButton

The wwWebImageButton is a control for displaying both pure image links or link and text links. The button can post back to the same page or navigate to a new URL if a NavigateUrl/UrlControlSource is provided.

As such this control is a hybrid between a wwWebHyperLink, wwWebLinkButton and wwWebImage. Basically you should be able to use this control for any links that require images. The control renders as a hyperlink with the image as its content.

The control renders as:

<a href="punchin.tt" id="lnkPunchIn" class="hoverbutton">
<img src="images/Punchin.gif" id="lnkPunchIn_image" > Punch In</a>
</div>

The main control is the div tag and it receives the ID and all base tags. You can use CSS to style the HREF and IMG tags internally.

Control sources of this control map to:

  • ControlSource - ImageUrl
  • UrlControlSource - NavigateUrl

For example to cause a custom postback operation to occur (in a Repeater or DataGrid for example):

<ww:wwWebImageButton runat="server" ID="btnDelete" 
                     Click="btnDelete_Click"
                     ImageUrl="~/images/remove.gif"
                     CssClass="hoverbutton"
                     UrlControlSource="this.Page.GetPostbackEventReference('Page','btnDelete_Click',TRANS(pk),.T.)"
/>

Custom
  wwWebControl
    wwWebImageButton

Class Members

MemberDescription

Click

Occurs when you click on the image link. Note this event does NOT fire if you have specified a NavigateUrl in which case the image doesn't post back and just navigates to the new URL.

BorderWidth

The borderwidth of the image. The value is a string and defaults to "0".

ControlSource

ControlSource that applies a databinding expression against the ImageUrl.

DisabledImageUrl

Image displayed when the control is disabled (enabled=.F.). If not set the ImageUrl is used.

ImageUrl

The Url to the Image to display.

NavigateUrl

The Url that is navigated to when you click the link.

OnClientClick

Allows attaching of a client side JavaScript click handler that fires when the link is clicked. Use return false; to force the click to prevent navigation:

Target

The target frame that the response will be rendered into.

Text

Optional text property for the Image button. If specified displays to the right of the image.

UrlControlSource

Controlsource that applies a databinding expression against the NavigateUrl.


© West Wind Technologies, 1996-2022 • Updated: 02/03/08
Comment or report problem with topic