private void LoadData()
 {
     VikkiSoft_BLL.Site s = new VikkiSoft_BLL.Site();
     if (s.LoadBySiteTypeID(1))
     {
         int i = 0;
         StringBuilder strSiteList = new StringBuilder();
         foreach (DataRow row in s.DefaultView.Table.Rows)
         {
             if (i % 3 == 0)
             {
                 strSiteList.Append("<div class=\"row\">");
             }
             strSiteList.Append("");
             if (!row.IsNull(VikkiSoft_BLL.Site.ColumnNames.Logo))
             {
                 strSiteList.Append("<div class=\"col-md-4 animate-box fadeInUp animated\"><div class=\"feature-left\"><span class=\"icon\">");
                 strSiteList.Append("<a href=\"" + row[VikkiSoft_BLL.Site.ColumnNames.URL].ToString() + "\" target=\"_blank\"><img src=\""
                     + SiteURL + Utils.GaleryImagePath.Replace("~", "") + "/" + row[VikkiSoft_BLL.Site.ColumnNames.Logo].ToString() + "\" alt=\"\"></a>");
                 strSiteList.Append("</span>");
             }
             strSiteList.Append("<div class=\"feature-copy\">");
             strSiteList.Append("<h3><a href=\"" + row[VikkiSoft_BLL.Site.ColumnNames.URL].ToString() + "\" target=\"_blank\">" + row[VikkiSoft_BLL.Site.ColumnNames.Name].ToString()
                 + "</a></h3>");
             strSiteList.Append("<p>" + row[VikkiSoft_BLL.Site.ColumnNames.Notes].ToString() + "</p>");
             strSiteList.Append("</div>");
             strSiteList.Append("</div></div>");
             i++;
             if (i % 3 == 0)
             {
                 strSiteList.Append("</div>");
             }
         }
         while (i % 3 != 0)
         {
             strSiteList.Append("<div class=\"col-lg-4 col-md-4\">&nbsp;</div>");
             i++;
             if (i % 3 == 0)
             {
                 strSiteList.Append("</div></div>");
             }
         }
         divSiteViewList.InnerHtml = strSiteList.ToString();
     }
 }
 private void LoadSites()
 {
     int countCells = 1;
     if(IsSitePage)
     {
         countCells = 2;
     }
     HtmlTableRow row = new HtmlTableRow();
     Site s = new Site();
     int index = 0;
     if (s.LoadBySiteTypeID(SiteTypeID))
     {
         do
         {
             if (row.Cells.Count < countCells)
             {
                 row.Cells.Add(AddSiteCellInnerHTML(s.s_Name, s.s_Banner, s.s_URL));
             }
             else
             {
                 tblSites.Rows.Add(row);
                 row = new HtmlTableRow();
                 row.Cells.Add(AddSiteCellInnerHTML(s.s_Name, s.s_Banner, s.s_URL));
             }
             if (!IsSitePage && index >= 5)
             {
                 break;
             }
             index++;
         } while (s.MoveNext());
     }
     for (int i = row.Cells.Count; i < countCells; i++)
     {
         row.Cells.Add(AddTableCell("&nbsp;"));
     }
     tblSites.Rows.Add(row);
 }