基类代码:
using System;
using System.Web;
using System.Configuration;
using System.Web.SessionState;
using GcPopedom.PopedomClass;
using ComFunction;namespace BasePageClass
{
/// <summary>
/// Class 的摘要说明。
/// </summary>
public class BasePage:System.Web.UI.Page
{
public FunctionClass FunClass =new FunctionClass();
public PopedomService PdmClass =new PopedomService(); #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);
this.Error += new System.EventHandler(this.Page_Error);
}
#endregion private void Page_Load(object sender, System.EventArgs e)
{
PdmClass.PageLoadPopedom(Session["UserID"].ToString());
} private void Page_Error(object sender,System.EventArgs e)
{
string errMessage = Server.GetLastError().Message;
errMessage+="&pPath="+Request.Path;
Server.ClearError();
Response.Redirect("/"+ConfigurationSettings.AppSettings["ProgramName"]+"/FrameWork/CommForm/AccessError.aspx?pError="+errMessage);
}
}
}
我想让我增加新页面时,能知道继承这个类
using System;
using System.Web;
using System.Configuration;
using System.Web.SessionState;
using GcPopedom.PopedomClass;
using ComFunction;namespace BasePageClass
{
/// <summary>
/// Class 的摘要说明。
/// </summary>
public class BasePage:System.Web.UI.Page
{
public FunctionClass FunClass =new FunctionClass();
public PopedomService PdmClass =new PopedomService(); #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);
this.Error += new System.EventHandler(this.Page_Error);
}
#endregion private void Page_Load(object sender, System.EventArgs e)
{
PdmClass.PageLoadPopedom(Session["UserID"].ToString());
} private void Page_Error(object sender,System.EventArgs e)
{
string errMessage = Server.GetLastError().Message;
errMessage+="&pPath="+Request.Path;
Server.ClearError();
Response.Redirect("/"+ConfigurationSettings.AppSettings["ProgramName"]+"/FrameWork/CommForm/AccessError.aspx?pError="+errMessage);
}
}
}
我想让我增加新页面时,能知道继承这个类
解决方案 »
- 求个分页类看看,不要存储过程的。。就这么点分了。
- 怎么这么郁闷?刷新!
- 如何给自定义控件添加属性?
- 想做个用户控件,焦点在<div>外就消失
- 如何布置web应用程序vs2003+sql2000+iis,即在一台既没有装iis和framework1.1也没有装sql2000的机上部署?
- 将一个datagrid放在table中实现内部滚动,如何实现行选择的时候定位??
- Datalist数据内容显示问题(如图)
- asp.net进行多人合作开发,如何做到分工合作上的协调,如何将各自的完成的模块整合起来?
- DataGrid中选中一条记录的问题,急啊!谢谢!
- 关于ASP.NET的问题.
- 诸位朋友帮忙看一下是哪出毛病了 小弟先谢了
- 如何让用户输入、选择一个文件夹的路径
D:\Program Files\Microsoft Visual Studio 8\Common7\IDE\ItemTemplatesCache\Web\CSharp\2052\WebForm.zip\
里面有一个文件: CodeBeside.cs打开编辑之,vs每次新增页面都是调用此模版
using System.Web;
using System.Configuration;
using System.Web.SessionState;
using GcPopedom.PopedomClass;
using ComFunction;using 继承的那个类!
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;using Tool;//工具
using Manager;//管理类
using Entity;//实体类