Wednesday, January 23, 2008 3:55 PM rojay12

Using ASP.Net 3.5's ListView To Display Image Galleries (LightBox and LightView User Controls)

The first time I laid eyes on the lightbox image gallery I fell in love with the UI and presentation. Since then, I have been meaning to get around to jamming the js code written by Lokesh Dhakar into an ASP.Net control so that I can reuse at will.  Although my schedule doesn't permit me building a full blown server control, I did have time to hack together a working user control. In fact the day after I created the LightBox version I found LightView, a variation on LightBox, and quickly morphed and created a version for it. I don't think that there is anything extremely complicated with what I have implamented, so I will spare you the long drawn out explanation.  But, If I get enough questions or requests I may throw together something. If you have VS 2008, you should be able to unzip and run these websites as is.  You might need to modify the solutions VirtualPath to run from "/" if you are running the site through the debugger (Scott can tell you how to do this: http://weblogs.asp.net/scottgu/archive/2006/12/19/tip-trick-how-to-run-a-root-site-with-the-local-web-server-using-vs-2005-sp1.aspx. It says VS 2005 but it is set the same in 2008).

http://idisk.mac.com/jaredroberts/Public/wwwLightBox.zip

http://idisk.mac.com/jaredroberts/Public/wwwLightView.zip 

Troubleshooting:

  1. Check the Setup instructions found at http://www.huddletogether.com/projects/lightbox2/ and http://www.nickstakenburg.com/projects/lightview/. You may need to modify the path to your images if you change the directory structure.
  2. You must set the path on the control of the image gallery you want to diplay in the format of "~/gallery1","~/gallery50", etc.
  3. If you want to display image types other then .jpg, you will need to open the asxc.vb file and modify the appropriate line number.

Version 2

I hope to import in the image handler that I have that will auto resize the images so that the thumbnails are actually thumbnails and not just resizes of the original. I also hope to put this into a server control. 

Feel free to improve this as you see fit and keep my up on the changes. Enjoy!

 

Filed under: , , , ,

Comments

# Using ASP.Net 3.5's ListView To Display Image Galleries (LightBox and LightView User Controls) - Code Junkie

Pingback from  Using ASP.Net 3.5's ListView To Display Image Galleries (LightBox and LightView User Controls) - Code Junkie

# re: Using ASP.Net 3.5's ListView To Display Image Galleries (LightBox and LightView User Controls)

Wednesday, April 16, 2008 6:20 PM by John Cardozo

I'm extracting an image from a SQL Server 2005 database and I'm trying to show them in LightView but the box shows the image in a small scrollable area but I think the problem is with ASP.Net beacuse it has the same behavior with image file. Can you help with that?

Thank you very much...

John

# re: Using ASP.Net 3.5's ListView To Display Image Galleries (LightBox and LightView User Controls)

Thursday, November 06, 2008 6:52 AM by mhindupur

i planned to use List view to show 5 images in listview like horizontal way and one link Button (example : >> more),this control will help my scenario? and where i can find the example?

# re: Using ASP.Net 3.5's ListView To Display Image Galleries (LightBox and LightView User Controls)

Friday, December 12, 2008 5:41 AM by Ben

Hi,

Is it possible you could give us and example where the images are loaded up from a sql database please?

Thanks

Ben

# re: Using ASP.Net 3.5's ListView To Display Image Galleries (LightBox and LightView User Controls)

Friday, June 12, 2009 4:24 PM by dmgroup1984

Hey Jared,

I think the links are dead to download the control that you created. Is there another place to download this?  I would really like to test out your control.

Thanks!!

Dale

# re: Using ASP.Net 3.5's ListView To Display Image Galleries (LightBox and LightView User Controls)

Thursday, October 08, 2009 6:17 PM by Julian

Hi Jared,

Your links are dead. This would be awesome to use. Please post a working link if you can.

Thanks!

Leave a Comment

(required) 
(required) 
(optional)
(required)