hi karthika,
using System;
using System.Data.SqlClient;
SqlConnection Conn = new SqlConnection("Server=(local);Database=Employee;User ID=sa;Password=password");
Conn.Open();
SqlCommand comm=new SqlCommand("insert
tblEmployeeDetails(EmployeeID,Name,Address,Contact)
values('"+TxtID.Text+"','"+TxtName.Text+"','"+TxtAddr.Text+"','"+TxtContact.Text+"')",Conn);
comm.ExecuteNonQuery();
Conn.Close();
This is single tier.. but three tier is best one for develping project..
by,
bala