Re: MouseUp/MouseDown events for ASP.NET ImageButton
From: Mikhail Arkhipov (Microsoft) (mikhaila_at_online.microsoft.com)
Date: 02/09/05
- Next message: lucky: "Search, Replace with Regular Expression"
- Previous message: Meena Desai: "Re: Effects of <identity impersonate="true"/>"
- In reply to: Nathan Sokalski: "MouseUp/MouseDown events for ASP.NET ImageButton"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 08 Feb 2005 23:06:08 -0800
You have to use client script and control appearance of the element on the
client. You can't use server code since up/down events do not come to the
server for performance reasons. Alternatively, you can try standard
asp:button and apply image to it using CSS background-image property via
either style or cssclass attribute.
Mikhail Arkhipov (Microsoft)
-- This post is provided 'AS IS' with no warranties and confers no rights
On 2/8/05 21:19, in article uSKFobmDFHA.624@TK2MSFTNGP15.phx.gbl, "Nathan
Sokalski" <njsokalski@hotmail.com> wrote:
> I want to create a pushbutton-like control on my webform that has an image
> on it. I used to think that this is what the ImageButton control was, but it
> seems to me that the ImageButton is nothing more than an image that can be
> clicked. I have figured out a way to make the ImageButton look like a button
> (there was some border property and the backgroud color). However, that
> still does not make it look like it is being "pushed" the way other buttons
> are. Because all I need to do to change the look between button up/button
> down is change the border property, I hoped I could use the
> MouseUp/MouseDown events to change this property. But for some reason the
> ImageButton control does not have these events. This brings up 2 questions:
>
> 1. Why is the control called ImageButton when it does not have the same
> properties or look as other types of buttons? I think a more appropriate
> name would be something like HyperImage or Image Link, anything that does
> not imply it acts and looks like a button.
>
> 2. What would be a good way to create the "pushing" effect of a button that
> I am trying to get?
>
> Thanks.
- Next message: lucky: "Search, Replace with Regular Expression"
- Previous message: Meena Desai: "Re: Effects of <identity impersonate="true"/>"
- In reply to: Nathan Sokalski: "MouseUp/MouseDown events for ASP.NET ImageButton"
- Messages sorted by: [ date ] [ thread ]