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

            frmPosts.DataSource = dat;
            frmPosts.DataBind();
            getcomms();
        }
Exemplo n.º 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);
        }
Exemplo n.º 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();
     }
 }