private void LoadData() { string html = ""; string Lang = Globals.GetLang(); MyTool.Gallery obj = new MyTool.Gallery(); DataSet ds = obj.GetAllPhoto("GalleryPhoto", Globals.AgentCatID); string styleImg = "width: " + _imageWidth + ", height: " + _imageHeight; for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { string detailUrl = "GalleryView.aspx?AlbumID=" + DataObject.GetString(ds, i, "AlbumID") + "&Lang=" + Lang; html += "<img style=\"" + styleImg + "\" src=\"Thumbnail.ashx?Width=" + _imageWidth + "&Height=" + _imageHeight + "&ImgFilePath=" + Globals.GetUploadsUrl() + DataObject.GetString(ds, i, "PhotoUrl") + "\" />"; } divContent.InnerHtml = html; }
public void LoadPhotoList() { MyTool.Gallery obj = new MyTool.Gallery(); int AlbumID = Globals.GetIntFromQueryString("AlbumID"); DataSet ds = new DataSet(); if (AlbumID != -1) { ds = obj.GetPhotoByAlbumID("GalleryPhoto", Globals.AgentCatID, AlbumID); } else { ds = obj.GetAllPhoto("GalleryPhoto", Globals.AgentCatID); } for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { string imgSrc = Globals.GetUploadsUrl() + Convert.ToString(ds.Tables[0].Rows[i]["PhotoUrl"]); Response.Write("<a href=\"" + imgSrc + "\" onclick=\"return hs.expand(this)\" >"); Response.Write("<img src=\"Thumbnail.ashx?Width=170&Height=150&ImgFilePath=" + imgSrc + "\" />"); Response.Write("</a>"); } }