daily pastebin goal
26%
SHARE
TWEET

Untitled

a guest May 16th, 2018 110 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Stringbuilder gridBuilder = new StringBuilder();
  2.  
  3.         while (index < objDS.Count)
  4.         {
  5.             // start of table row
  6.             gridBuilder.AppendLine("<tr align="center">");
  7.             for (int column = 0; column < numberOfColumns; column++)
  8.             {
  9.                 if (index < objDS.Count)
  10.                 {
  11.                     int record = (index) + ((objDS.CurrentPageIndex) * 12);
  12.                     DataRow dr = photosDataSet.Tables[0].Rows[record];
  13.                     gridBuilder.AppendLine("<td width="187.5" valign="top">");
  14.                     int pictureNumber = Convert.ToInt32(dr.ItemArray[0].ToString());
  15.                     string picnum = pictureNumber.ToString().PadLeft(3, '0');
  16.                     int picNumberlink = pictureNumber - 1;
  17.                     string image = "/pics/" + AlbumName + "/Thumbnails/" + AlbumName + "-pic" + picnum + ".jpg";
  18.                     gridBuilder.AppendLine("<a id="picLinks_" + record + "" class="picLinks" href=''><img class="instant ishadow50"  src="" + image + ""></img></a>");
  19.                     gridBuilder.AppendLine("<br/>");
  20.                     gridBuilder.AppendLine(dr.ItemArray[1].ToString());
  21.                     gridBuilder.AppendLine("</td>");
  22.                 }
  23.                 index++;
  24.             }
  25.             gridBuilder.AppendLine("</tr>");
  26.         }
  27.         gridBuilder.AppendLine("</table>");
  28.  
  29.         ViewData["Content"] = gridBuilder.ToString();
  30.    
  31. <%= new MyGridGenerator(DataTable ..) %>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top