Shadowbox with ASP.NET Update Panel

1 message Options
Embed this post
Permalink
Akwolf

Shadowbox with ASP.NET Update Panel

Reply Threaded More More options
Print post
Permalink
Hi,

  I have incorporated you shadowbox into my ASP.Net project but I keep getting a weird side effect when I use it in unisome with AJAX update panel.  When the page is first loaded all links works.  When a shadowbox is called and the user clicks on the close button to return to the parent page all links using shadowbox are disabled.  When you click a link the shadowbox doesn't come up but rather the page itself is loaded instead.

  I am propbably not making any sense right so I will take it step by step with code.

  1.  I have links on page place within an ASP.NET UpdatePanel:
    <UpdatePanel>
       <ContentPanel>
          thispage.
       </ContentPanel>
    </UpdatePanel>

    When clicked it opens up a shadowbox.

  2. On child page I have a button that closes the shadowbox:

     <asp:hyperlink id="btnclose" onclick="CloseShadowbox" text="Close"></asp:hyperlink>

     In Code Behind I have method that registers a script to close the shadowbox:

     this.Page.ClientScript.RegisterStartupScript(this.GetType(), "closthisbox", "self.parent.updated();", true);

     When button is clicked the system calls a script on the parent page to clos the shadowbox and refresh gridview on the parent page.

  3. When I click on links on parent now, the shadow box doesn't work.  The shadowbox doesn't come up.  Instead the child page loads.


  If I remove the UpdatePanel then the links work and weird side effect doesn' happen.  I would like to use the UpdatePanel but it seems there are some javascript issues.