protected void Page_Load(object sender, EventArgs e) { facade = new BusinessLogic.BusinessFacade(conn); if (Request.Params["tid"] != null) { tid = Convert.ToInt16(Request.Params["tid"]); BusinessLogic.Article.Preparation p = facade.GetTestimonialArticleById(tid); lbl_ArticleTitle.Text = p.Name + " - " + p.Citizenship; logo.ImageUrl = Utils.validateImage(General.EMP_TESTIMONIAL_LOGO + p.Name , p.Logo); lbl_Name.Text = p.Name; lbl_Citizenship.Text = p.Citizenship; literal_Body.Text = p.Body.Replace(Environment.NewLine, "<br />"); ; } else { Response.Redirect("~/publicarea/errorpages/error404.aspx"); } List<Comment> cList = facade.ViewCommentByTid(tid); if (cList.Count != 0) { CollectionPager1.MaxPages = 10000; CollectionPager1.PageSize = 10; CollectionPager1.DataSource =facade.ViewCommentByTid(tid); CollectionPager1.BindToControl = repeater_showComment; repeater_showComment.DataSource = CollectionPager1.DataSourcePaged; repeater_showComment.DataBind(); } else { repeater_showComment.Visible = false; } //Limit input characters txt_Content.Attributes.Add("onkeydown", "textCounter(this,'" + Label1.ClientID + "', 5000)"); txt_Content.Attributes.Add("onkeyup", "textCounter(this,'" + Label1.ClientID + "', 5000)"); txt_Content.Attributes.Add("onmousedown", "textCounter(this,'" + Label1.ClientID + "', 5000)"); txt_Content.Attributes.Add("onmouseup", "textCounter(this,'" + Label1.ClientID + "', 5000)"); txt_Content.Attributes.Add("onblur", "textCounter(this,'" + Label1.ClientID + "', 5000)"); }