开发者

Not able to display an image in datalist control using lightbox script[jQuery]

i am trying to display an thumbnail image in datalist control which is working fine but once i click the image instead of showing the pop up in front of the page. it is showing behind the datalist control i have downloaded lightbox script added all the references ans css what is wrong going on here here i am refernce FullImage.ashx which is used to display the orginal image and ThumbNailImage.ashx for converting the original image size to thumbnail size below is code what i have done

<html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Untitled Page</title>
        <script src="js/builder.js" type="text/javascript"></script>
        <script src="js/scriptaculous.js" type="text/javascript"></script>
        <script src="js/prototype.js" type="text/javascript"></script>
        <script src="js/lightbox.js" type="text/javascript"></script>
        <script src="js/effects.js" type="text/javascript"></script>
        <link href="css/lightbox.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
        <form id="form1" runat="server">
        <table class="FriendsTable" width="100%">
            <tr>
                <td align="center" colspan="10">
                    <asp:Panel ID="pnlFriends" runat="server" Height="100%" Width="100%">
                        <asp:DataList ID="gvImages" runat="server" RepeatColumns="5" RepeatDirection="Horizontal"
                            Style="z-index: 101; left: 16px; position: absolute; top: 16px" Width="100%"
                            OnItemDataBound="gvImages_ItemDataBound" BorderWidth="1px" GridLines="Both" CellPadding="3"
                            BackColor="#DEBA84" CellSpacing="2" BorderStyle="None" BorderColor="#DEBA84">
                            <ItemTemplate>
                                <table border="0">
                                    <tr>
                                        <td>
                                            imagename:
                                        </td>
                                        <td>
                                            <asp:Label ID="lblCustomerID" runat="server" Text='<%# 
    Eval("imagename") %>' />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            ImageID:
                                        </td>
                                        <td>
                                            <asp:Label ID="lblEmployeeID" runat="server" Text='<%#
    Eval("ImageID") %>' />
                                        </td>
                                    </tr>
                                </table>
                                <%--<a href="javascript:void(window.open('<%# "FullImage.ashx?ImID="+ Eval("ImageID")%>','_blank','toolbar=no,menubar=no',rel = "lightbox">))">--%>
                                <a href='<%# "FullImage.ashx?ImID="+ Eval("ImageID") %>' rel="lightbox">
                                    <asp:Image ID="Image1" runat="server" ImageUrl='<%# "ThumbNailImage.ashx?ImID="+ Eval("ImageID")  %>'
                                        Height="100" Width="100" Style="border: 0" />
                                </a>
                            </ItemTem开发者_Go百科plate>
                            <SeparatorTemplate>
                                <br>
                                <br>
                            </SeparatorTemplate>
                        </asp:DataList>
                    </asp:Panel>
                </td>
            </tr>
        </table>
        </form>
    </body>
    </html>

any help would be great thank you


i had made wrong buy adding the

Style="z-index: 101; left: 16px; position: absolute; top: 16px" in the datalist control

after removing this code every thing worked fine

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜