Problem facing in generating image gallery...whr i am doing wrong??

Posted by Rickeybglr under ASP.NET on 8/10/2012 | Points: 10 | Views : 533 | Status : [Member] | Replies : 0
Hi All,

i am creating an image gallery. and on web pages i am getting all the images(image path is displaying instead of thumbnail) but when i click on the image to view it, a blank screen is open.
public void viewGallery(string fldNamePath)
try {
DirectoryInfo myImageDir = new DirectoryInfo(Server.MapPath("~/images/UsersGallery/" + fldName)); //fldName is the folderName in which images are stored
DataTable dt = new DataTable();
foreach (FileInfo file in myImageDir.GetFiles())
DataRow dr = dt.NewRow();
dr["col"] = Server.MapPath("~/images/UsersGallery/") + fldName + "\\" + file.Name;
DLImz.DataSource = dt;
ASPX code:
<script type="text/javascript">
$(function () {
-----some code-----
<asp:Panel ID="UPGallery" runat="server">
<asp:DataList ID="DLImz" runat="server" RepeatColumns="5">
<a href='<%# Eval("col")%>' rel="prettyPhoto[pp_gal]" title="caption">
<img src='<%# Eval("col")%>' width="60" height="60" alt='<%# Eval("col") %>' />


(No response found.)

Login to post response