views:

222

answers:

2

Hi all, I have an within which I have a LinkButton, and I am trying to handle its client side click event before its partial postback event occurs. I am using jquery for this, and its click event is not firing at all. The code works fine without updatepanel, but fails with it.

<asp:UpdatePanel ID="ContinueTestPanel" runat="server">
    <ContentTemplate>
    <div id="Pause-Screen">
        <asp:Label ID="ServerMessage" runat="server" />
    </div>
    <div class="submit">
        <asp:LinkButton ID="ContinueTest" runat="server" text="Continue" CssClass="continue-test"/>
    </div>
    </ContentTemplate>
  </asp:UpdatePanel>

Corresponding jquery code :

    $(".continue-test").click(function() {
            $(".pause-screen-wrapper").hide();
        });

I have double tested, but of no use. Your thoughts plz.

A: 

It sounds like it could be a conflict with the Microsoft AJAX library and jQuery. Have you tried using $.noConflict(); ?

Phil.Wheeler
Yes i have used noconflict(), and then tried but to no use at all.I have used $addHandler(element, 'click', this.myClickHandler); after reading this link http://www.asp.net/AJAX/Documentation/Live/tutorials/CustomClientEvents/default.aspx but this also doesnt help. I have double checked everything.
pokrate
+1  A: 

check the below URL

http://asimsajjad.blogspot.com/2009/01/jquery-ajax-update-panel-problem-and.html

Hope that will help.

Asim Sajjad
Excellent, beautiful, terrific.3 cheers !!!
pokrate