using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.DataVisualization.Charting;


public partial class ContactUs : System.Web.UI.Page
{
       protected void BtnSend_Click(object sender, EventArgs e)
    {
        try
        {
            Lsc_EVotingDataContext db = new Lsc_EVotingDataContext();
            tblMessage add = new tblMessage();
            add.Email = Txt_Email.Text;
            add.Name = Txt_Name.Text;
            add.message = Txt_Message.Text;
            db.tblMessages.InsertOnSubmit(add);
            db.SubmitChanges();
            LblMessage.Visible = true;
            LblMessage.Text = "پیام ارسال شد!";
        }
        catch
        {
            LblMessage.Visible = true;
            LblMessage.Text = "پیام ارسال نشد!";
        }
    }
}

    


  
