Asp prct7
Asp prct7
cs
namespace prct7
{
publ c part al class Form1 : Form
{
publ c Form1()
{
In t al zeComponent();
}
SqlConnect on conn = new SqlConnect on(@"Data Source=DELL-BM\
SQLEXPRESS;In t al Catalog=college;Integrated Secur ty=True;TrustServerCert f
cate=True");
}
}
}
}
}
}
//MenuForms.cs(Des gn)
//MenuForms.cs sourcecode
us ng System;
us ng System.Collect ons.Gener
c; us ng System.ComponentModel;
us ng System.Data;
us ng System.Draw
ng; us ng System.L
nq;
us ng System.Text;
us ng System.Thread
ng.Tasks; us ng System.W
ndows.Forms;
us ng M crosoft.Data.SqlCl ent;
namespace prct7
{
publ c part al class MenuForms : Form
{
publ c MenuForms()
{
In t al zeComponent();
}
SqlConnect on conn = new SqlConnect on(@"Data Source=DELL-BM\
SQLEXPRESS;In t al Catalog=student;Integrated Secur ty=True;TrustServerCert f
cate=True");
Click ok
Now our information is saved in student1 table in Student Database