ImageButton events stopped firing on client?

  • Thread starter Thread starter Darren Clark
  • Start date Start date
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....
 
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....
 
Back
Top