public void Bind() { var data = aSvc.GetAll(); if (data != null) { this.hfAboutId.Value = data.About_Id.ToString(); this.txtName.Text = data.About_Title; this.txtAboutContent.Value = data.About_Content; } }
protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) { return; } var data = aboutSvc.GetAll(); title = data.About_Title; content = data.About_Content; time = data.About_UpdateTime.ToString("yyyy年MM月dd日"); }
protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) { return; } #region 绑定导航导航栏 this.RepWebMenusList.DataSource = webMenusSvc.GetAllWhatIsShow(); this.RepWebMenusList.DataBind(); #endregion #region 绑定关于我们 var data = aboutSvc.GetAll(); aboutContent = data.About_Content; #endregion }
public ActionResult Detail() { return(View(_aboutService.GetAll().First())); }