上面是我写的一个System.Web.UI.Page 类
用来在别的页面代码中引用的
如
index.aspx.cs
public class index : MyPage但是在用户控件里面就不可以如
public class myUserControl : MyPage后来发现是因为用户控件的父级是:System.Web.UI.UserControl 而页面是:System.Web.UI.Page
所以我都得写两个MyPage
一个MyPage.cs 一个 MyPageForControl.cs
虽然这样可以,但每一次更新都要更新这两一个有点麻烦有没有办法把他们合在一起也就是不管是
System.Web.UI.Page 还是 System.Web.UI.UserControl
都可以写public class index : MyPage谢谢
用来在别的页面代码中引用的
如
index.aspx.cs
public class index : MyPage但是在用户控件里面就不可以如
public class myUserControl : MyPage后来发现是因为用户控件的父级是:System.Web.UI.UserControl 而页面是:System.Web.UI.Page
所以我都得写两个MyPage
一个MyPage.cs 一个 MyPageForControl.cs
虽然这样可以,但每一次更新都要更新这两一个有点麻烦有没有办法把他们合在一起也就是不管是
System.Web.UI.Page 还是 System.Web.UI.UserControl
都可以写public class index : MyPage谢谢
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货