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.

Coud you be more specific?
You also seem to have posted double code.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.