protected void Page_Load(object sender, EventArgs e)
 {
     ListTintuc.DataSource = TinTuc.getTintuc();
     ListTintuc.DataBind();
     ListLink.DataSource = TinTuc.getTintuc();
     ListLink.DataBind();
 }
예제 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int id = Convert.ToInt32(Request.QueryString["id"]);
            MyLinqDataContext data = new MyLinqDataContext();
            var content            = from c in data.zNews
                                     where c.NewsID == id
                                     select new
            {
                c.Title,
                c.Content,
                c.DateCreated
            };

            Repeater1.DataSource = content;
            Repeater1.DataBind();
            ListLink.DataSource = TinTuc.getTintuc();
            ListLink.DataBind();
        }