Link to home
Start Free TrialLog in
Avatar of Bill Warren
Bill WarrenFlag for United States of America

asked on

Lightbox photos in ASP.net

First of all I am a novice on ASP.net

I have an aspx page with connection to a sql2005 server. I have tried to add a lightbox photo gallery object to the Gridview. I had help on getting it started however I seem to have lost my source on help for the moment. The page works when pulling data from the SQl dbase until I add in the lightbox feature. Here is the code in the page. I get the error on the IIS server when I try to run the page.
error CS0103: The name 'Image1' does not exist in the current context
I can't find a reference of Image1 anywhere
<asp:GridView ID="grdProjects" runat="server">
        </asp:GridView>--%>
        
        <asp:DataList ID="grdProjects" runat="server">
        <ItemTemplate>
          <table width="527" border="0" align="center" cellpadding="0" cellspacing="0">
		    <tr>
		      <td width="87" valign="bottom">&nbsp;</td><td width="262"></a>
		      <td width="168">&nbsp;</td>
		      <td width="10">&nbsp;</td>
	        </tr>
		    <tr>
		      <td height="28" colspan="3" align="left" valign="top"><strong class="AFSCSS"><asp:Label ID="lblProjectName" runat="server"
            text= '<%# Eval("ProjectName") %>' />&nbsp;&bull;&nbsp;
            <asp:Label ID="lblCity2" runat="server"
                    Text='<%# Eval("City") %>' />
            ,&nbsp;
            <asp:Label ID="lblState2" runat="server"
                    Text= '<%# Eval("ProjectState") %>' /></strong></td>
	        </tr>
		    <tr>
<!-- ----LightBox --->
		      <asp:Repeater ID="RepeaterLightBox" runat="server">
                  <HeaderTemplate>
              <td width="87" valign="bottom">
              </HeaderTemplate>
                <ItemTemplate>
              <a id="LightBoxImage" href="images/projects/ina.jpg" width="62" height="58"  
			rel="lightbox[Photo]" title="my caption">
                        <img id="pic" src="images/projects/ina.jpg" alt="No Image Available!" />
                    </a>
               
                <asp:Repeater ID="RepeaterLightBox" runat="server">
                  <HeaderTemplate>
                    
                </HeaderTemplate>
                <ItemTemplate>
                                    
                        <a id="LightBox_Content" href="<%#DataBinder.Eval(Container.DataItem,
			 "PhotoPath")%><%#DataBinder.Eval(Container.DataItem,
			 "PhotoName")%>" rel="<%#DataBinder.Eval
					(Container.DataItem, "rel")%>"
			 title="<%#DataBinder.Eval(Container.DataItem, "GroupName")%>"> </a>
             </ItemTemplate>
                <FooterTemplate>
                </FooterTemplate>
                </asp:Repeater>
                </td>
             
                
             
		      <td colspan="2" align="left" valign="top" class="textsmall">Client: <span style="color: #03F"><asp:Label ID="lblClient" runat="server"
                    text='<%# Eval("Client") %>' />&nbsp;&ndash;&nbsp;</span><span style="color: #03F"><asp:Label ID="lblClientType" runat="server"
                    text='<%# Eval("ClientType") %>' /></span><br>
		        Number of Buildings:<span style="color: #03F"><asp:Label ID="lblNOB" runat="server"
                    text='<%# Eval("NumberOfBuildings") %>' /></span><br>
              Number of Units: <span style="color: #03F"><asp:Label ID="lblNOU" runat="server"
                    text='<%# Eval("NumberOfUnits") %>' /></span><br>
              Project Description: <span style="color: #03F"><asp:Label ID="lblDescription" runat="server"
                    text='<%# Eval("ProjectDescription") %>' /></span></td>
	      </table>
              </ItemTemplate>

        </asp:DataList>
          </form>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of alexbumbacea
alexbumbacea
Flag of Romania image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial