ImageButton events stopped firing on client?

D

Darren Clark

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.btSimpleSearch_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....
 
L

Lau Lei Cheong

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" <[email protected]> ???
???...
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.btSimpleSearch_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....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top