Reputation: 47743
Here's what is in my .aspx:
<div><input id="testButton" type="image" src="<%=TestImageUrl %>" onserverclick="RedirectTest" /></div>
And in my code-behind this:
protected void RedirectTest(object sender, EventArgs e)
{
// Logic is here
}
It's not hitting my method at all when I click the image. And please note, I do not want to use an ImageButton. I want to figure out how to get this working with a plain old input tag.
Upvotes: 0
Views: 1322
Reputation: 6802
Seems like you're missing the runat="server" attribute on the input tag.
Upvotes: 3