user517406
user517406

Reputation: 13773

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?

Upvotes: 0

Views: 2517

Answers (1)

Muhammad Akhtar
Muhammad Akhtar

Reputation: 52241

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

Upvotes: 3

Related Questions