1 using System; 2 using System.Collections; 3 using System.Web; 4 using System.Web.SessionState; 5 using System.Web.UI; 6 using System.Web.UI.WebControls; 7 using System.Web.UI.HtmlControls; 8 9 namespace MonoTest 10 { 11 /// <summary> 12 /// Summary description for Test. 13 /// </summary> 14 public class Test : System.Web.UI.Page 15 { 16 protected System.Web.UI.WebControls.Label Label1; 17 protected System.Web.UI.WebControls.Button SubmitButton; 18 protected System.Web.UI.WebControls.TextBox TextBox1; 19 Page_Load(object sender, System.EventArgs e)20 private void Page_Load(object sender, System.EventArgs e) 21 { 22 Label1.Text = "Page Loaded"; 23 } 24 25 #region Web Form Designer generated code OnInit(EventArgs e)26 override protected void OnInit(EventArgs e) 27 { 28 // 29 // CODEGEN: This call is required by the ASP.NET Web Form Designer. 30 // 31 InitializeComponent(); 32 base.OnInit(e); 33 } 34 35 /// <summary> 36 /// Required method for Designer support - do not modify 37 /// the contents of this method with the code editor. 38 /// </summary> InitializeComponent()39 private void InitializeComponent() 40 { 41 this.SubmitButton.Click += new System.EventHandler(this.SubmitButton_Click); 42 this.Load += new System.EventHandler(this.Page_Load); 43 44 } 45 #endregion 46 SubmitButton_Click(object sender, System.EventArgs e)47 private void SubmitButton_Click(object sender, System.EventArgs e) 48 { 49 Label1.Text = TextBox1.Text; 50 } 51 52 } 53 } 54