Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            List <Posts_M> postlist = Posts_B.PostList();

            rptPostList.DataSource = postlist;
            rptPostList.DataBind();
            //ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('欢迎')</script>");
        }
Example #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         int order = Posts_B.PostList().Count();
         pagerPost.RecordCount = order;
         Bind();
     }
     if (!string.IsNullOrWhiteSpace(Request.QueryString["postId"]))
     {
         if (Posts_B.delBypostId(Request.QueryString["postId"]))
         {
             ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('删除成功');location.href='AdminPost.aspx';</script>");
         }
     }
 }