<Input type='image'> posts back automatically
-
Hello, I noticed that when I have an input type of image (html control) it automatically posts back when I click it, even though I am not running it as a server control.
-
Hello, I noticed that when I have an input type of image (html control) it automatically posts back when I click it, even though I am not running it as a server control.
The element creates an image control, when clicked, causes the form to be immediately submited. Have a look at 'Input Image'[^] in MSDN. To solve this thing, you can simply add some scripts on the client side. function Body_OnLoad() { window.document.getElementById("help").onclick = Image_Click; } function Image_Click() { //TO DO: return false; }