Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3855672
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T17:48:43+00:00 2026-05-19T17:48:43+00:00

I am new to programming especially jQuery. I am trying to use ColorBox to

  • 0

I am new to programming especially jQuery.

I am trying to use ColorBox to display photos from an album using the example from http://www.xdevsoftware.com/blog/post/Using-ColorBox-in-ASPNET.aspx The details of the photo are stored and retrived from a DB.

Everything works fine like the photos for the selected album display in the DataList, the problem is that when I click on a photo, instead of using coloBox to display the photo, it opens the actual photo e.g. localhost:3478/FPOS_v2/uploads/08012011080.JPG

Below is the .aspx code:

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>

    <link href="ColorBox/colorbox.css" rel="stylesheet" type="text/css" />
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript" /> 
    <script src="ColorBox/jquery.colorbox.js" type="text/javascript" />

    <script type="text/javascript">
        $(document).ready(function () {
            $("a[rel='example1']").colorbox();
        });
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:DataList runat="server" ID="dlColorBox" 
                    RepeatColumns="3" 
                    RepeatDirection="Horizontal">
        <ItemTemplate>
            <asp:HyperLink ID="HyperLink1" runat="server" 
                            NavigateUrl='<%# "~/uploads/"+Eval("OriginalFilePath") %>' 
                            rel="example1" 
                            Title='<%# Eval("FileName") %>'>
                    <asp:Image ID="Image1" runat="server" 
                            ImageUrl='<%# "~/uploads/"+Eval("ThumbFilePath") %>' 
                            Width="100" 
                            Height="100" 
                            BorderStyle="None" />
            </asp:HyperLink>
        </ItemTemplate>
    </asp:DataList>

    </div>
    </form>
</body>
</html>

Below is the vb.net code:

    Imports SqlHelper
Imports System.Data


Partial Class colorBoxDisplay
    Inherits System.Web.UI.Page

    Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
        DAL.connectionstring = ConfigurationManager.ConnectionStrings("fpaConnectionString").ConnectionString
    End Sub

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        BuildDataSet()
    End Sub

    Private Sub BuildDataSet()
        Dim dataset As DataSet

        dataset = SqlHelper.ExecuteDataset(DAL.connectionstring, "fpa_SP_album_view_by_id_gridview", 34)

        dlColorBox.DataSource = dataset
        dlColorBox.DataBind()
    End Sub

Could someone please tell how to correct this? or to be able to display the photos within dlColorBox DataList using ColorBox?

So it is displays the photos within the selected album like Grouped Photo 1 example colorpowered.com/colorbox/core/example1/index.html

I am new to jQuery so could you please indicate how to make this work by changing the code as I have spent last 3 days looking at different examples on the internet.

Any help would be much appreciated 🙂

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T17:48:44+00:00Added an answer on May 19, 2026 at 5:48 pm

    Check Colorbox javascript and css files loaded properyly. And check html output of your page.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new to programming especially jQuery. I am trying to sort (order) images
I am new to programming especially jQuery and webservices. I want to pass the
i been thinking of a new programming language. Before trying to implement it i
New to Linux programming in general. I am trying to communicate with a kernel
I'm new to windows programming and I'm trying to get notified of all changes
First off, I am new to programming (especially with C#) and thanks for your
Im new to programming and I dont know very much about but I'm making
I'm fairly new at programming, but I've wondered how shell text editors such as
I am new to programming, and am wondering if there is a correct way
I'm quite new to programming, and I was wondering if there is a good

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.