Web.UI.MobileControls.MobilePage
{
protected System.Web.UI.MobileControls.TextBox TextBox1;
protected void Page_Load(object sender, System.EventArgs e)
{
ChangeLabel.Text = DateTime.Now.ToLongTimeString() + ": MCTextBox No change.";
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
CHAPTER 10 ?– OTHER S ERVER C ONTROLS 521
///
// /// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// private void InitializeComponent()
{
}
#endregion
protected void MCTextBox1_TextChanged(object sender, System.EventArgs e)
{
ChangeLabel.Text = DateTime.Now.ToLongTimeString() +
": MCTextbox Changed! " + MCTextBox1.Text;
}
}
}
The sample consists of MCTextBox, a Command button, and a Label to display a message.
When the form first appears, the message label displays ???No change???. Change the value in the
MCTextBox control, and click the Command button.
When the mobile form reloads after the postback process, the message label displays an
updated time and a message stating that the value changed.
Pages:
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686