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
  • 相关阅读:
    超棒的前端开发界面套件 InK
    现代浏览器的web音频javascript类库 Howler.js
    富有创意的菱形响应式页面设计
    创意味儿十足的web布局及交互设计
    一个超酷的横向多列响应式布局效果
    帮助你生成响应式布局的CSS模板 xyCSS
    免费素材大荟萃:免费图标和UI设计
    使用浏览器生成超棒的midi音乐 midi.js
    JavaScript 和 .NET 中的 JavaScript Object Notation (JSON) 简介
    推荐一批基于web的开源html文本编辑器(40+)
  • 原文地址:https://www.cnblogs.com/simhare/p/827180.html
Copyright © 2011-2022 走看看