Quantcast
Channel: Web Forms
Viewing all articles
Browse latest Browse all 23244

How do I bind a javascript class to a asp:linkbutton

$
0
0

I have a formview attached to a gridview so that when I click select on a record on my gridview, the record populates in the gridview. Now I want to open the formview in a lightbox, but I am running into trouble.

here is my javascript class:

 

$('.lightbox').click(function () {
                $('.backdrop, .box').animate({ 'opacity': '.50' }, 300, 'linear');
                $('.box').animate({ 'opacity': '1.00' }, 300, 'linear');
                $('.backdrop, .box').css('display', 'block');
            });

here is my HTML:

<asp:TemplateField HeaderText="Select"><ItemTemplate><asp:LinkButton ID="LinkButton3" CommandArgument='<%# Eval("num") %>' CommandName="Select" runat="server" Text="Select" /> </ItemTemplate></asp:TemplateField>

How to add the javascript class "lightbox" to the linkbutton?


Viewing all articles
Browse latest Browse all 23244

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>