private void LoadData() { try { string Lang = Globals.GetLang(); MyTool.AboutUs obj = new MyTool.AboutUs(); int ID = obj.GetFirstAboutUsID(Globals.AgentCatID, Lang); DataSet ds = obj.GetAboutUsByArticleID("Article", ID, Lang); lblAbout.InnerHtml = Convert.ToString(ds.Tables[0].Rows[0]["Content"]); } catch { } }
private void LoadData() { try { string Lang = Globals.GetLang(); int ID = Globals.GetIntFromQueryString("ID"); MyTool.AboutUs obj = new MyTool.AboutUs(); DataSet ds = new DataSet(); if (ID == -1) { ID = obj.GetFirstAboutUsID(Globals.AgentCatID, Lang); //Response.Redirect("AboutUs.aspx?ID=" + ID + "&Lang=" + Lang); } //else //{ ds = obj.GetAboutUsByArticleID("Article", ID, Lang); Page.Title += " - " + Convert.ToString(ds.Tables[0].Rows[0]["Title"]); lblTitle.InnerText = Convert.ToString(ds.Tables[0].Rows[0]["Title"]); //lblExcerpt.InnerText = Convert.ToString(ds.Tables[0].Rows[0]["Excerpt"]); lblContent.InnerHtml = Convert.ToString(ds.Tables[0].Rows[0]["Content"]); //lblPostDate.InnerText = Globals.GetStringDateTime(Lang, Convert.ToDateTime(Convert.ToString(ds.Tables[0].Rows[0]["PostDate"]))); lblAuthors.InnerText = Convert.ToString(ds.Tables[0].Rows[0]["Authors"]); string ImageURL = Convert.ToString(ds.Tables[0].Rows[0]["ImageURL"]); if (Globals.IsFileExistent(ImageURL)) { img.Width = _imageWidth; img.Height = _imageHeight; img.Src = Globals.GetUploadsUrl() + ImageURL; } else { div_img_article.Attributes.Add("style", "display:none;"); } //} } catch { } }