0

I am trying to complete an assignment in C#. I have buttons for name, address and zip code.
I have Buttons for Display Label Info, Clear and Exit. I can type whatever I want into the form and I can clear them and exit with them. My problem is with the display label info. My program is not putting in the information I put in the form.

The area where I am having a problem in My code is as follows

public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void btnDisplay_Click(object sender, EventArgs e)
        {
            MessageTextBox.Text = "Watson, come here.";

        }

        private void btnClear_Click(object sender, EventArgs e)
        {
            //Clear rich textbox
            MessageTextBox.Text = string.Empty;
        }

        private void btnExit_Click(object sender, EventArgs e)
        {
            //Exit the project.
            this.Close();

Message TextBox.Textpublic partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void btnDisplay_Click(object sender, EventArgs e)
        {
            MessageTextBox.Text = "Watson, come here.";

        }

        private void btnClear_Click(object sender, EventArgs e)
        {
            //Clear rich textbox
            MessageTextBox.Text = string.Empty;
        }

        private void btnExit_Click(object sender, EventArgs e)
        {
            //Exit the project.
            this.Close();

Thanks for any help you can offer.

Edited by __avd: Added [code] tags. For easy readability, always wrap programming code within posts in [code] (code blocks).

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by ddanbe
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.