读书人

base.OnInit (e);是什么意思,该如何处

发布时间: 2012-03-13 11:21:10 作者: rapoo

base.OnInit (e);是什么意思
protected override void OnInit(EventArgs e)
{
if(this.MasterPageFile == null)
{
if(ThemeMasterExists)
this.MasterPageFile = ThemePath;
else if(DefaultMasterExists)
this.MasterPageFile = DefaultThemePath;
else
throw new Exception(string.Format( "The MasterThemeFile {0} could not be found in the {1} or default theme directory ",ThemeMasterFile,ThemeName));
}
base.OnInit (e);
}

[解决办法]
执行基类的OnInit

*****************************************************************************
欢迎使用CSDN论坛专用阅读器 : CSDN Reader(附全部源代码)

最新版本:20070212

http://www.cnblogs.com/feiyun0112/archive/2006/09/20/509783.html
[解决办法]
调用基类的这个方法.基类的这个方法是virtual的,你现在重载它,加入了自己的相关代码.然后再调用基类的方法

读书人网 >asp.net

热点推荐