Post Top Ad

Asp.Net Core Mvc

Blazor

Post Top Ad


User Input From TextBox In C#

Sample code

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

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

        private void showButton_Click(object sender, EventArgs e)
        {
            string firstName = firstNameTextBox.Text;
            string lastName = lastNameTextBox.Text;
            string fullName = firstName + " " + lastName;

            fullNameTextBox.Text = fullName;


            //MessageBox.Show("Hi, " + firstName + " Hello world in C#");
        }
    }
}
#UserInput#DesktopApplication#AspDotNet #Mvc

No comments:

Post a Comment

Post Top Ad