cu_help_info.ascx.cs

来自「针对于企业以及中小站长的网站首页面设计与管理」· CS 代码 · 共 73 行

CS
73
字号
namespace CnzzMain.Templates.Default
{
	using System;
	using System.Data;
	using System.Drawing;
	using System.Web;
	using System.Web.UI.WebControls;
	using System.Web.UI.HtmlControls;
	using CnzzMain.rules;

	/// <summary>
	///		Help_Info 的摘要说明。
	/// </summary>
	public class cu_Help_Info : BaseControl
	{
		Help help = new Help();
		private void Page_Load(object sender, System.EventArgs e)
		{
			// 在此处放置用户代码以初始化页面
			if(!IsPostBack)
			{
				ViewState["NoticeID"] = Request.QueryString["id"];
				BindData();
			}
		}

		#region Web 窗体设计器生成的代码
		override protected void OnInit(EventArgs e)
		{
			//
			// CODEGEN: 该调用是 ASP.NET Web 窗体设计器所必需的。
			//
			InitializeComponent();
			base.OnInit(e);
		}
		
		/// <summary>
		///		设计器支持所需的方法 - 不要使用代码编辑器
		///		修改此方法的内容。
		/// </summary>
		private void InitializeComponent()
		{
			this.Load += new System.EventHandler(this.Page_Load);
		}
		#endregion
		string _Title;
		public string Title
		{
			get{return _Title;}
			set{_Title=value;}
		}
		DateTime _UpdateTime;
		public DateTime UpdateTime
		{
			get{return _UpdateTime;}
			set{_UpdateTime=value;}
		}
		string _Content;
		public string Content
		{
			get{return _Content;}
			set{_Content=value;}
		}
		private void BindData()
		{
			DataRow dr = help.Info(ViewState["NoticeID"]);
			_Title = dr["Title"].ToString();
			_Content = dr["Content"].ToString();
			_UpdateTime = Convert.ToDateTime(dr["UpdateTime"]);
		}
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?