protected void LoadResoucesInfoPurchasing() { string pageNameBread = ""; MainContentGeneric resourcesinfo = new MainContentGeneric(); DataSet dsresourcesinfo = new DataSet(); StringBuilder sb = new StringBuilder(); Boolean ingreso = false; //--- dsresourcesinfo = resourcesinfo.Get_Site_Generic_D(iGeneId); sb.AppendLine("<div id=\"main-content\">"); foreach (DataTable table in dsresourcesinfo.Tables) { foreach (DataRow row in table.Rows) { if (ingreso == false) { ingreso = true; sb.AppendLine("<div class=\"titleSupport\"><h1>" + row["GeneTitle"].ToString() + "</h1></div>"); } pageNameBread = row["GeneTitle"].ToString(); Main_MasterPage m = (Main_MasterPage)Page.Master; m.pageTitleBar = pageNameBread + " - " + m.pageTitleBar; pageName= row["GeneTitle"].ToString(); sb.AppendLine("<div class=\"boxPurchasingInfo\">"); sb.AppendLine("<div class=\"mainInfoResource wysiwig\">"); sb.AppendLine("<p><strong>" + row["GeneDTitle"].ToString() + "</strong></p><br />"); sb.AppendLine(row["GeneDContent"].ToString()); sb.AppendLine("</div>"); sb.AppendLine("<div class=\"clear\"></div>"); string path = ""; if (!Regex.IsMatch(row["GeneDFile"].ToString(), @"^(ft|htt)p(s?)://([\w-]+\.)+[\w-]+(/[\w- ./]*)+\.(?:gif|jpg|jpeg|png|GIF|JPEG|JPG|PNG|Gif|Jpg|Jpeg|Png)$")) { path = Global.globalSiteImagesPath + "/"; } if (row["GeneDFile"].ToString() != "") { sb.AppendLine("<div id=\"boxContImage\" style=\"width:540px; height:104px;\">"); sb.AppendLine("<img id=\"images1\" style=\"height:104px;\" src=\"" + path + row["GeneDFile"].ToString() + "\" alt=\"" + row["GeneDTitle"].ToString() + "\" style=\"padding: 10px 0;\" />"); //onload=\"getDim(document.getElementById('boxContImage'),this)\" sb.AppendLine("</div>"); } //if (row["GeneDFile"].ToString() != "") sb.AppendLine("<div class=\"imgPurchaInfo\"><img src=\"" + Global.globalSiteImagesPath + "/" + row["GeneDFile"].ToString() + "\"></div>"); if (row["GeneDLinkTitle"].ToString() != "") { sb.AppendLine("<div class=\"mailCustomer\"><p>"); if (Convert.ToInt32(row["LinkTypeId"].ToString()) == 1) sb.AppendLine("<a href=\"" + row["GeneDLink"].ToString() + "\" target=\"_blank\">" + row["GeneDLinkTitle"].ToString() + "</a>"); else sb.AppendLine("<a href=\"" + row["GeneDLink"].ToString() + "\">" + row["GeneDLinkTitle"].ToString()+"</a>"); sb.AppendLine("</p></div>"); } sb.AppendLine("</div>"); } } sb.AppendLine("</div>"); PlaceHolder_Resources_Purchasing.Controls.Add(new LiteralControl(sb.ToString())); sb = null; resourcesinfo = null; dsresourcesinfo = null; Main_MasterPage main = (Main_MasterPage)Page.Master; if (Request["TypeGen"] != null) { main._site_breadLink += "<li><a href=resourcecenter.aspx?id=0>" + "Resource Center" + "</a></li>"; } else { main._site_breadLink += "<li><a href=# onClick=\"return false;\">" + "About " + SiteConstants.SiteName + "</a></li>"; } main._site_breadLink += "<li class=\"last\"><a href=# onClick=\"return false;\"><strong>" + pageNameBread + "</strong></a></li>"; }