Using of C# method in onclick event

  • Thread starter Thread starter jurot
  • Start date Start date
J

jurot

Hi,

Can someone help me how can I catch IMG tag event onclick witch C#
method?

e.g.
in codebehind:

..
void CSharpEventHandler()
{

}
..


in aspx i have:

...
<img id="SomeImg" src="img.gif" name="main" runat="server"
onclick=???>
...


Thanks very much.

Regards,
Jurot
 
<asp:ImageButton id="Something" ImageUrl="img.gif" runat="server"
OnClick="Image_Click"/>

//generic code used
public void Image_Click(object sender, EventArgs e)
{
// do something
}
jurot said:
Hi,

Can someone help me how can I catch IMG tag event onclick witch C#
method?

e.g.
in codebehind:

.
void CSharpEventHandler()
{

}
.


in aspx i have:

..
<img id="SomeImg" src="img.gif" name="main" runat="server"
onclick=???>
..


Thanks very much.

Regards,
Jurot
 
Back
Top