Please help me sir to insert data from Modal popup textboxes
HTML
<div class="modal fade" id="myModal1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Desktop PC</h4>
</div>
<div class="modal-body">
<b>
<p>Place Request here</p>
</b>
<table border="0" width="700">
<tr>
<br />
<br />
<td>Location:<br />
<asp:TextBox ID="TextBox1" runat="server" BackColor="WhiteSmoke"></asp:TextBox>
</td>
<td>Asset Name:<br />
<asp:TextBox ID="TextBox2" Text="Desktop_PC" runat="server" BackColor="Wheat"></asp:TextBox>
</td>
</tr>
<tr>
<td>Purpose :<br />
<asp:TextBox ID="TextBox4" runat="server" BackColor="WhiteSmoke"></asp:TextBox>
</td>
<td>Remark<br />
<asp:TextBox ID="TextBox3" runat="server" BackColor="WhiteSmoke"></asp:TextBox>
</td>
</tr>
</table>
</div>
<div class="modal-footer">
<asp:Button ID="Button_pc" class="btn btn-default" runat="server" CausesValidation="False" OnClick="Button_pc_Click" Text="Save" />
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
C#
protected void Button_pc_Click(object sender, EventArgs e)
{
string cs = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ConnectionString;
SqlConnection con = new SqlConnection(cs);
SqlCommand cmd = new SqlCommand("INSERT INTO req (EmpCode,asst_typ,lcn,prps,rmk) VALUES('" + Label14.Text + "','" + TextBox1.Text + "','" + TextBox2.Text + "','" + TextBox4.Text + "','" + TextBox3.Text + "')", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
TextBox1.Text = "";
TextBox2.Text = "";
TextBox3.Text = "";
TextBox4.Text = "";
}
Database
CREATE TABLE [dbo].[req] (
[Id] INT IDENTITY (1, 1) NOT NULL,
[EmpCode] VARCHAR (10) NULL,
[asst_typ] VARCHAR (500) NULL,
[lcn] VARCHAR (500) NULL,
[prps] VARCHAR (500) NULL,
[rmk] VARCHAR (500) NULL,
PRIMARY KEY CLUSTERED ([Id] ASC)
);