protected void Page_Load(object sender, EventArgs e) { LastPageThread = Convert.ToString(Session["LastPage"]); CatId = Convert.ToString(Session["CatId"]); CatName = Convert.ToString(Session["CatName"]); QsId = Convert.ToString(Session["ThreadId"]); //PostCounter(); PostId = Request.QueryString["Id"]; PostsRpt.DataSource = DataBaseQueries.GetThreadContent(QsId); PostsRpt.DataBind(); TitleRpt.DataSource = DataBaseQueries.GetThreadTitle(QsId); TitleRpt.DataBind(); TitleRpt2.DataSource = DataBaseQueries.GetThreadTitle(QsId); TitleRpt2.DataBind(); if (!IsPostBack) { EditPostTextAreaRpt.DataSource = DataBaseQueries.GetPostContent(PostId); EditPostTextAreaRpt.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { PostEditor.Visible = Per.Allowed("CreatePost"); PostEditorDivider.Visible = Per.Allowed("CreatePost"); ShowEditor.Visible = !Per.Allowed("CreatePost"); Session["LastPage"] = Request.Url.PathAndQuery; CatId = Convert.ToString(Session["CatId"]); CatName = Convert.ToString(Session["CatName"]); //Hvis bruger er logget ind skal ShpwEditor-knappen fjernes, og editoren skal vises. //PostCounter(); QsId = Request.QueryString["Id"]; Session["ThreadId"] = QsId; PostsRpt.DataSource = DataBaseQueries.GetThreadContent(QsId); PostsRpt.DataBind(); TitleRpt.DataSource = DataBaseQueries.GetThreadTitle(QsId); TitleRpt.DataBind(); TitleRpt2.DataSource = DataBaseQueries.GetThreadTitle(QsId); TitleRpt2.DataBind(); //foreach (RepeaterItem item in PostsRpt.Items) //{ // FindControl("EditPostLink").Visible = false; //} }