简体   繁体   中英

calling client side event on button click in GridView

I need to call a javasript function when a button is clicked in my GridView. Is it possible to do this, and if so does somebody have an example?

  <asp:TemplateField>
       <asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="javascript:alert('hello');" />
   </asp:TemplateField>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM