How can I run Java Script from the Web Image Button?
Hi,
If you ask how to run script on button click, then WebImageButton supports 2 options.
1. Set explicit script statements2. Set name of function which will be called on click
You also probably will want to disable default autopostback.
Below examples for 2 cases:
<script type="text/javascript">function WebImageButton2_Click(oButton, oEvent){ alert('WebImageButton2_Click');}</script>
<igtxt:WebImageButton ID="WebImageButton2" runat="server" AutoSubmit="False"> <ClientSideEvents Click="WebImageButton2_Click" /></igtxt:WebImageButton>
<igtxt:WebImageButton ID="WebImageButton1" runat="server"> <ClientSideEvents Click="alert('click')" /></igtxt:WebImageButton>