什么什么什么 baseOnInit e;是什么意思

来源:互联网  时间:2016/8/22 7:52:18

关于网友提出的“什么什么什么 baseOnInit e;是什么意思”问题疑问,本网通过在网上对“什么什么什么 baseOnInit e;是什么意思”有关的相关答案进行了整理,供用户进行参考,详细问题解答如下:

问题:什么什么什么 baseOnInit 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);
}


解决方案1:

调用基类的这个方法.
基类的这个方法是virtual的,你现在重载它,加入了自己的相关代码.然后再调用基类的方法

解决方案2:

执行基类的OnInit
  
*****************************************************************************
欢迎使用CSDN论坛专用阅读器 : CSDN Reader(附全部源代码) 
最新版本:20070212
http://www.cnblogs.com/feiyun0112/archive/2006/09/20/509783.html

上一篇如何使用网络解决问题?-----不一定马上须要baidu/google
下一篇部分机器无法读写Cookie,为什么?
明星图片
相关文章
《什么什么什么 baseOnInit e;是什么意思》由码蚁之家搜集整理于网络,
联系邮箱:mxgf168#qq.com(#改为@)