Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                rpBreadcrumb.DataSource = data.Cat_SelectID(Convert.ToInt32(Request["idcat"]));
                rpBreadcrumb.DataBind();

                rpPost.DataSource = data.Post_SelectIDcat(Convert.ToInt32(Request["idcat"]));
                rpPost.DataBind();

                var catName = data.Cat_SelectID(Convert.ToInt32(Request["idcat"]));

                foreach (var t in catName)
                {
                    Session["title"] = t.Cat_name.ToString();
                }
            }
        }
Beispiel #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                int idCat  = Convert.ToInt32(Request["idcat"]);
                int idPost = Convert.ToInt32(Request["id"]);

                rpBreadcrumb.DataSource = data.Cat_SelectID(idCat);
                rpBreadcrumb.DataBind();

                rpContent.DataSource = data.Post_SelectID(idPost);
                rpContent.DataBind();

                rpPostsRandom.DataSource = data.Post_SelectRandom(idCat);
                rpPostsRandom.DataBind();

                var titlePost = data.Post_SelectID(idPost);

                foreach (var t in titlePost)
                {
                    Session["title"] = t.Post_title.ToString();
                }
            }
        }