This is an example of an image button - when clicked it will run the btnNoteGvFooterAdd_Click. Actually the onclick property is not really necessary. If you are using VS2008, then doubleclick the button and the source code window will create a method to hold the logic to execute when the button is pressed.
This is an example of an image button placed inside a databound container - like a formview or a gridview (bound to an ObjectDataSet). When you click it, it triggers the containers Insert function.
it also is tied to a validation group. That means if there are any validator controls also associated to this group they will checked and if invalid cause the command to fail.
To convert an imagebutton into a javascript button
Here is the button
1 2 3 4 5 6 7
<asp:ImageButtonid="AssetIDLookupImageButton" runat="server" Width="16px" ToolTip="Perform an asset lookup" Height="16px" ImageUrl="zoom.gif"> </asp:ImageButton>
' you want to do this ' if (document.forms[0].all('" & AssetTypeSelectorRadioButtonList.ClientID & "').options[1].selected) " & vbCrLf ' but what's rendered is individual radio controls. ' so then you want to do this ' if (document.forms[0].all('" & AssetTypeSelectorRadioButtonList.items(1).ClientID & "').selected) " & vbCrLf ' but an item doesn't have a client id