MSV FM

dot.antimicrobial@66.96.161.157: ~ $
Path : /hermes/bosweb/b1705/reserva.events/apex/
File Upload :
Current < : /hermes/bosweb/b1705/reserva.events/apex/index.aspx.cs

using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class index : System.Web.UI.Page
{
    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["apex_DBConnectionString"].ConnectionString);
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void btn_submit_Click(object sender, EventArgs e)
    {
        try
        {
            SqlCommand com = new SqlCommand("INSERT INTO [dbo].[Contact_Us]([Contact_Name],[Contact_Email],[Contact_Phone],[Contact_Message]) VALUES ('" + txt_name.Text + "','" + txt_email.Text + "','" + txt_phone.Text + "','" + txt_message.Text+ "')", con);
            con.Open();
            com.ExecuteNonQuery();
            con.Close();

            txt_name.Text = "";
            txt_email.Text = "";
            txt_phone.Text = "";
            txt_message.Text = "";
        }
        catch (Exception ex)
        {
            Response.Write(ex);
        }
    }
}