protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { UseFunc uf = new UseFunc(); IList <News> mynewslist = uf.GetNews(true); this.U_newstitlelist1.bind(top8list(mynewslist)); mynewslist = uf.GetNews(false); this.U_newstitlelist2.bind(top8list(mynewslist)); } }
protected void Page_Load(object sender, EventArgs e) { UseFunc uf = new UseFunc(); IList <News> mynewslist = uf.GetNews(true); bind(mynewslist); }
protected void Button_list_edit_Click(object sender, CommandEventArgs e) { UseFunc uf = new UseFunc(); this.U_updatenews1.Visible = true; this.U_insertnews1.Visible = false; this.Panel_news.Visible = false; //this.Panel_news.Height = 30; this.U_updatenews1.news = uf.GetNews(int.Parse(e.CommandName.ToString())); }
protected void Page_Load(object sender, EventArgs e) { UseFunc uf = new UseFunc(); News mynews = uf.GetNews(int.Parse(Session["newsid"].ToString())); this.Label_newstitle.Text = mynews.Title; this.Label_newsauthor.Text = "作者:" + uf.GetMembers(mynews.Mid).Name; this.Label_time.Text = "时间:" + mynews.Datetime; //this.Label_newscontext.Text = huanhang(mynews.Context); this.Label_newscontext.Text = mynews.Context.Replace("\r\n", "<br> "); }