Example #1
0
        protected void btnDisplay_Click(object sender, EventArgs e)
        {
            DataSet dat = BlogPosts.getPost(Convert.ToInt32(drpPosts.SelectedValue));

            frmPosts.DataSource = dat;
            frmPosts.DataBind();
            getcomms();
        }
Example #2
0
        protected void adsf(object sender, EventArgs e)
        {
            var    textTitle = txtTitle.Text;
            string textCont  = txtCont.Text;
            string textAuth  = txtAuth.Text;

            BlogPosts.addPost(textTitle, textCont, textAuth);
        }
Example #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         DataSet ds = BlogPosts.getPosts();
         drpPosts.DataSource     = ds;
         drpPosts.DataTextField  = ds.Tables[0].Columns["PostTitle"].ToString();
         drpPosts.DataValueField = ds.Tables[0].Columns["PostId"].ToString();
         drpPosts.DataBind();
     }
 }