Posts

Showing posts with the label C# Add data to Datagridview from Database

C# Code For Beginners (Part 1)

Image
1. Add item to Textbox from Textbox 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; using MySql.Data.MySqlClient; namespace Blog1 {     public partial class Form1 : Form     {         public Form1()         {             InitializeComponent();         }         private void btnadd_Click(object sender, EventArgs e)         {             int code1 = int.Parse(tbcode1.Text);             tbcode2.Text=code1.ToString();             string name1= tbname1.Text;             tbname2.Text = name1;                   }  ...