473,511 Members | 15,477 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ImageButton events stopped firing on client?

I have an image button on a page

<asp:ImageButton Runat=server ID="btSimpleSearch" onMouseOut="this.src = 'images/button_search_n.gif'"
onMouseOver="this.src = 'images/button_search_r.gif'" ImageUrl="images/button_search_n.gif" name="btSimpleSearch" width="74" height="21" border="0"></asp:ImageButton>

Then i declare it at the top of the class file
protected System.Web.UI.WebControls.ImageButton btSimpleSearch;

then i wire up the event

private void InitializeComponent()

{

this.btSimpleSearch.Click += new System.Web.UI.ImageClickEventHandler(this.btSimple Search_onClick);

this.Load += new System.EventHandler(this.Page_Load);

}

private void btSimpleSearch_onClick(object sender, ImageClickEventArgs e)

{

this.CompleteSearch(false);

}

Why would the events stop firing? i dont remember chaning anything that would change this....

Nov 18 '05 #1
2 1546
Just some thoughts.

Have you placed the control over a form with runat=server?

Is there any error when you change to designer view?

"Darren Clark" <dc******@hotmail.com> ???
news:el****************@tk2msftngp13.phx.gbl ???...
I have an image button on a page

<asp:ImageButton Runat=server ID="btSimpleSearch" onMouseOut="this.src =
'images/button_search_n.gif'"
onMouseOver="this.src = 'images/button_search_r.gif'"
ImageUrl="images/button_search_n.gif" name="btSimpleSearch" width="74"
height="21" border="0"></asp:ImageButton>

Then i declare it at the top of the class file
protected System.Web.UI.WebControls.ImageButton btSimpleSearch;
then i wire up the event
private void InitializeComponent()
{
this.btSimpleSearch.Click += new
System.Web.UI.ImageClickEventHandler(this.btSimple Search_onClick);
this.Load += new System.EventHandler(this.Page_Load);
}
private void btSimpleSearch_onClick(object sender, ImageClickEventArgs e)
{
this.CompleteSearch(false);
}

Why would the events stop firing? i dont remember chaning anything that
would change this....
Nov 18 '05 #2
Yes it is in a form with runat=server

No errors come up....
"Lau Lei Cheong" <le****@yehoo.com.hk> wrote in message
news:u7**************@tk2msftngp13.phx.gbl...
Just some thoughts.

Have you placed the control over a form with runat=server?

Is there any error when you change to designer view?

"Darren Clark" <dc******@hotmail.com> ???
news:el****************@tk2msftngp13.phx.gbl ???...
I have an image button on a page

<asp:ImageButton Runat=server ID="btSimpleSearch" onMouseOut="this.src =
'images/button_search_n.gif'"
onMouseOver="this.src = 'images/button_search_r.gif'"
ImageUrl="images/button_search_n.gif" name="btSimpleSearch" width="74"
height="21" border="0"></asp:ImageButton>

Then i declare it at the top of the class file
protected System.Web.UI.WebControls.ImageButton btSimpleSearch;
then i wire up the event
private void InitializeComponent()
{
this.btSimpleSearch.Click += new
System.Web.UI.ImageClickEventHandler(this.btSimple Search_onClick);
this.Load += new System.EventHandler(this.Page_Load);
}
private void btSimpleSearch_onClick(object sender, ImageClickEventArgs e)
{
this.CompleteSearch(false);
}

Why would the events stop firing? i dont remember chaning anything that
would change this....

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1196
by: Manuel D. Jim?nez | last post by:
Hi, we are developing an ActiveX control which plays a video streaming. We have used Visual Studio .net wizard to develop almost all the control interface, however we have trouble with event...
1
2480
by: DalePres | last post by:
Does anyone know if there is a known bug or workaround, or other solution to this problem? I have a page with several imagebutton server controls and needed to handle the PreRender event in C#....
6
22115
by: ruca | last post by:
Hi gurus, I have a imagebutton in my WebForm, and I want that when I click (mouse down) on her the imagebutton change image and when I "unclick" (mouse up) change to the original image. Basically...
1
5785
by: Nathan Sokalski | last post by:
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...
0
993
by: Hanover | last post by:
I have a very weird situation. I have several controls on a form, all of them have on-changed events that are supposed to pass their values to a dataset. The problem is, their events suddenly...
2
1665
by: Lagwagon | last post by:
I have an Image Button inside of a Datagrid and its not firing the datagrid.itemcommand event when it is clicked. Does anyone have a link to a tutorial or a solution for this problem? For my...
0
1813
by: Tom Edelbrok | last post by:
I'm using VS 2005 to develop an intranet asp.net web application and I get a weird situation. If I start out with any ASPX page that contains an ImageButton control followed by a TextBox control,...
1
1734
by: TimmyTurner | last post by:
Hi all I'm working on a ASP.NET, C# project on Visual Studio 2005, using a MSDB in _vista_. My problem is that the events for the buttons are not firing. I've searched the web and the solution...
7
18721
by: =?Utf-8?B?RWFnbGVSZWRASGlnaEZseWluZ0JpcmRzLmNvbQ== | last post by:
I am having trouble getting client-side events to fire on ImageButtons. Instead I am seeing postbacks. The client-side handlers end with "return false;" but they are never called. ...
0
7153
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7432
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7517
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5077
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4743
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3230
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3218
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1583
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.