asp.net 公共方法继承 本人是asp.net初学者。 很多人说asp.net不能多继承,所以就想写一个公共类。其他页面都继承这个类。BasePage页面 但有个问题
BasePage.cs页面这样
using System; using System.Collections; using System.Configuration; using System.Data; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts;
namespace HIMS.Web.HIMS { public partial class BasePage : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) {
} } }
然后其他页面,比如Add.aspx页面
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 System.Text; using Maticsoft.Common; using LTP.Accounts.Bus;
namespace HIMS.Web.HIMS.Hz_EmailMessageInfo { public partial class Add : BasePage { protected void Page_Load(object sender, EventArgs e) {