日期:2014-05-18 浏览次数:20515 次
public class HandlerBase : IHttpHandler { public class HandlerBase : IHttpHandler { protected HttpContext context = null; #region 公共属性 private int cityID = 0; /// <summary> /// 第一种定义属性方法 /// </summary> public int CityID { get { if (this.cityID == 0) context.Request.ParamesToInt32GET("cityid", 0); return cityID; } } private int seriesID = HttpContext.Current.Request.ParamesToInt32GET("seriesid", 0); /// <summary> /// 第二种定义属性方法 /// </summary> public int SeriesID { get { return seriesID; } } #endregion public void ProcessRequest(HttpContext context) { this.context = context; ProcessRequest(); } protected virtual void ProcessRequest() { } public bool IsReusable { get { return false; } } } }