ow do I get a HtmlInputImage to raise the ServerClick event
I have two inputs one is a submit button the other is a
image. The submit button works the input image does not.
Does anyone know why this would happen?
I would like to mention that I have overridden viewstate
and do not use server side forms.
Below is my code maybe I am missing something
<input type="image" src="~/img/btnPurchase.gif " width="90"
height="26" id="Purchase" runat="server">
<input type="submit" id="sbmt" runat="server"
value="submit">
and the code behind is as follows.
protected System.Web.UI.H tmlControls.Htm lInputImage
Purchase;
protected System.Web.UI.H tmlControls.Htm lInputButton sbmt;
private void InitializeCompo nent()
{
this.sbmt.Serve rClick += new System.EventHan dler
(this.Sbmt_Clic k);
this.Purchase.S erverClick += new
System.Web.UI.I mageClickEventH andler(this.Pur chase_Click);
this.Load += new System.EventHan dler
(this.Page_Load );
}
public void Purchase_Click( object sender,
System.Web.UI.I mageClickEventA rgs e)
{
Response.Write( "Purchase_C lick Fired!!!");
Response.End();
}
private void Sbmt_Click(obje ct sender, System.EventArg s e)
{
Response.Write( "Purchase_C lick Fired!!!");
Response.End();
}