This project is read-only.

Problem with LightBox and UpdatePanel

Topics: Developer Forum
Mar 19, 2008 at 4:44 PM
I've try to put a LightBox control inside an UpdatePanel.
Into this Updatepanel i've put a Button, Label, LightBoxScriptManager and LightBoxHyperLink control.

This work correctly on the first postack, i click on then LightBoxHyperLink control and i view the image.
I click on the button and the page make a Ajax postback.
After that when i click on then LightBoxHyperLink control the image is not viewing properly.

This is my Test Page

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" %>
<%@ Register TagPrefix="LgtB" Assembly="LightBox" Namespace="LightBox" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled</title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Button ID="Btn1" runat="server" Text="click" />
<asp:Label ID="Lbl1" runat="server"></asp:Label>
<hr />
<LgtB:ScriptManager ID="ImgManager" runat="server" />
<LgtB:HyperLink ID="aaaa2" runat="server" ImageUrl="URLofLittleImage"
NavigateUrl="UrlOfFullImage"></LgtB:HyperLink>
</ContentTemplate>
</asp:UpdatePanel>
</form>
</body>
</html>