</script> <html> <head> </head> <body> <form runat=server> <p> <br /> Enter your name: <asp:TextBox id=TextBox1 runat=server></asp:TextBox> </p> <p> <b><asp:Label id=Label1 runat=server Width=247px></asp:Label></b> </p> <p> <asp:Button id=Button1 onclick=Button1_Click runat=server Text=Submit></asp:Button> </p> </form> </body> </html> WinForm开发: 十五、一个简单的WinForm程序: using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; public class SimpleForm : System.Windows.Forms.Form {
private System.ComponentModel.Container components = null; private System.Windows.Forms.Button button1; private System.Windows.Forms.TextBox textBox1; public SimpleForm() { InitializeComponent(); } protected override void Dispose( bool disposing ) { if( disposing ) { if (components != null) { components.Dispose(); } } base.Dispose( disposing ); } #region Windows Form Designer generated code private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.Size = new System.Drawing.Size(300,300); this.Text = Form1; |