Thursday, March 27, 2014

How to Show a String in Messagebox using C# with asp.net visual studio .

If we want to show string in massage box please see bellow :
The Graphical View : 
The Coding :

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

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

        private void showButton_Click(object sender, EventArgs e)
        {
            string showString;
            showString = stringTextBox.Text;
            MessageBox.Show(showString);
        }
    }
}

2 comments: