using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using CodeCafe.Web; public partial class News_View : System.Web.UI.Page { protected int ArticleID; /**********************************************************************************************************/ /// /// Handles the Load event of the Page control. /// /// The source of the event. /// The instance containing the event data. protected void Page_Load(object sender, EventArgs e) { LoadArticle(); } /**********************************************************************************************************/ /// /// Loads the article. /// private void LoadArticle() { int id = Utils.StrToIntDef(Request["id"], 0); clsNews news = new clsNews(); news.Load(id); ArticleID = news.ni_id; if (news.ni_id > 0) { this.Title = news.ni_title + " :: BluWave Software"; ltHeading.Text = news.ni_title; ltContent.Text = news.ni_copy; ltAuthor.Text = news.ni_date.ToString("dd MMMM yyyy"); } else { pnlButtons.Visible = false; ltHeading.Text = "Invalid article selected!"; } } }