default.aspx.cs

来自「水晶报表详细资料水晶报表详细资料水晶报表详细资料」· CS 代码 · 共 53 行

CS
53
字号
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            HtmlButton myButton = new HtmlButton();
            myButton.ID = "Button1";
            myButton.InnerText = "添加按钮!";
            PlaceHolder1.Controls.Add(myButton);
            Literal Literal1 = new Literal();
            Literal1.Text = "<br>";
            PlaceHolder1.Controls.Add(Literal1);
            myButton = new HtmlButton();
            myButton.ID = "Button2";
            myButton.InnerText = "添加按钮!!";
            PlaceHolder1.Controls.Add(myButton);
            Literal Literal2 = new Literal();
            Literal2.Text = "<br>";
            PlaceHolder1.Controls.Add(Literal2);
            myButton = new HtmlButton();
            myButton.ID = "Button3";
            myButton.InnerText = "添加按钮!!!";
            PlaceHolder1.Controls.Add(myButton);
            Literal Literal3 = new Literal();
            Literal3.Text = "<br>";
            PlaceHolder1.Controls.Add(Literal3);
            myButton = new HtmlButton();
            myButton.ID = "Button4";
            myButton.InnerText = "添加按钮!!!!";
            PlaceHolder1.Controls.Add(myButton);
            Literal Literal4 = new Literal();
            Literal4.Text = "<br>";
            PlaceHolder1.Controls.Add(Literal4);
            TextBox Mytxt = new TextBox();
            Mytxt.ID = "TextBox1";
            Mytxt.Text = "文本框1";
            PlaceHolder1.Controls.Add(Mytxt);
        }

    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?