• asp.net 页面的重载


     1using System;
     2using System.Collections;
     3using System.ComponentModel;
     4using System.Data;
     5using System.Drawing;
     6using System.Web;
     7using System.Web.SessionState;
     8using System.Web.UI;
     9using System.Web.UI.WebControls;
    10using System.Web.UI.HtmlControls;
    11
    12namespace WebApplication1
    13{
    14    /// <summary>
    15    /// WebForm1 的摘要说明。
    16    /// </summary>

    17    public class WebForm1 : System.Web.UI.Page
    18    {
    19        private void Page_Load(object sender, System.EventArgs e)
    20        {
    21            // 在此处放置用户代码以初始化页面
    22             AfterLoadPage();
    23        }

    24        protected virtual void AfterLoadPage()
    25        {
    26        }

    27
    28        Web 窗体设计器生成的代码
    48    }

    49}

    50

    how to use:

     1using System;
     2
     3namespace WebApplication1
     4{
     5    /// <summary>
     6    /// Class1 的摘要说明。
     7    /// </summary>

     8    public class Class1:WebForm1
     9    {
    10        public Class1()
    11        {        
    12        
    13        }

    14        protected override void AfterLoadPage()
    15        {
    16            Response.Write("DDDDDDDDDDD");
    17        }

    18
    19    }

    20}

    21
  • 相关阅读:
    vue-router2.0 组件之间传参及获取动态参数
    vuex
    移动端微信部分知识总结
    移动端js知识总结
    [luogu]P4365[九省联考]秘密袭击coat(非官方正解)
    [luogu]P4364 [九省联考2018]IIIDX
    [luogu]P4363 [九省联考2018]一双木棋chess
    后缀数组自用
    BZOJ5288 [Hnoi2018]游戏
    Bzoj5290: [Hnoi2018]道路
  • 原文地址:https://www.cnblogs.com/chinatefl/p/278608.html
Copyright © 2020-2023  润新知