zoukankan      html  css  js  c++  java
  • /* 自定义控件*/

    创建自定义控件
    BLL层中的Hello.cs:
    using System;
    using System.Web.UI;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Text;
    using System.Windows.Forms;

    namespace BLL
    {
        
    public partial class Hello : System.Web.UI.Control
        
    {

            
    /*在BLL层右键Add---〉CustomControl会自动产生下面的一个构造器
             * 和一个OnPaint方法---〉怀疑和using System.Windows.Forms;有关
             
    */

            
    //public Hello()
            
    //{
            
    //    InitializeComponent();
            
    //}

            
    //protected override void OnPaint(PaintEventArgs pe)
            
    //{
            
    //    // TODO: Add custom paint code here

            
    //    // Calling the base class OnPaint
            
    //    base.OnPaint(pe);
            
    //}
            protected override void Render(HtmlTextWriter writer)
            
    {
                
    //base.Render(writer);
                writer.Write("Hello,baby!");
            }

        }

    }


    UI层的Hello.aspx
    Hello.aspx
  • 相关阅读:
    为什么GNU grep如此之快?
    在百度nlp实习一个月时间里用到的shell操作
    InfoPi简介、试用链接、资料索引
    自定义worker的方法,及一例
    2017.1.9版给信息源新增:max_len、max_db字段
    手把手写一个html_json信息源
    定义信息源的一些示例(xml文件)
    启用https协议的方法
    安装第三方Python模块,增加InfoPi的健壮性
    更新日志(建议升级到2017.1.18a) && 更新程序的方法
  • 原文地址:https://www.cnblogs.com/simhare/p/827180.html
Copyright © 2011-2022 走看看