首页 > Web开发 > 详细

查看网页程序集

时间:2015-08-19 23:08:14      阅读:244      评论:0      收藏:0      [点我收藏+]

Response.Write(this.GetType() + "<br/>");
Response.Write(this.GetType().Assembly.Location + "<br/>");
Response.Write(this.GetType().BaseType + "<br/>");
Response.Write(this.GetType().BaseType.Assembly.Location + "<br/>");

 

namespace WebApplication1
{
    public partial class WebForm1 : System.Web.UI.Page
  public class Page : TemplateControl, IHttpHandler

通过反编译:

[CompilerGlobalScope]
public class webform1_aspx : WebForm1, IRequiresSessionState, IHttpHandler

 
public class WebForm1 : Page
{

 

得出结论,前台页面生成 webform1_aspx 类,并继承 webform1类,而webform1类继承Page类,间接的继承 IHttpHandler类,所以

前台通过<%%>调用后台方法,这个方法的修饰符必须在protected和它的以上

查看网页程序集

原文:http://www.cnblogs.com/ChineseMoonGod/p/4743454.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!