public class Ac_Contact
{
public string strconn = System.Configuration.ConfigurationManager.AppSettings["DataBase"].ToString();
public int Contact_Insert(Contact tact)
{
StringBuilder sb = new StringBuilder();
sb.Append("insert into Message(Country,Com_Name,Website,Com_Address,Title,Con_Name,Tel,Email,Message,Busi_Type) ");
sb.Append("values(");
sb.Append("'" + tact.Country + "',");
sb.Append("'" + tact.CompanyName + "',");
sb.Append("'" + tact.Website + "',");
sb.Append("'" + tact.CompanyAddress + "',");
sb.Append("'" + tact.Title + "',");
sb.Append("'" + tact.ContactName + "',");
sb.Append("'" + tact.Tel + "',");
sb.Append("'" + tact.Email + "',");
sb.Append("'" + tact.Message + "',");
sb.Append("'')");
SqlConnection conn = new SqlConnection(strconn);
SqlCommand cmd = new SqlCommand();
cmd.Connection = conn;
cmd.CommandText = sb.ToString();
conn.Open();
int i = cmd.ExecuteNonQuery();
conn.Close();