Thanks for suggestion.
code working but while i have insert single values then double value has been inserted.
please help me sir.
namespace TS
{
public partial class Default : System.Web.UI.Page
{
protected void Btnsave_Click(object sender, EventArgs e)
{
try
{
CreateConnection();
OpenConnection();
_sqlCommand.CommandText = "spx_TS5";
_sqlCommand.CommandType = CommandType.StoredProcedure;
_sqlCommand.Parameters.AddWithValue("@Dept ", TextBox2.Text.ToString());
_sqlCommand.Parameters.AddWithValue("@wrk_nm ", TextBox3.Text.ToString());
_sqlCommand.Parameters.AddWithValue("@fts_no", TextBox4.Text.ToString());
_sqlCommand.Parameters.AddWithValue("@prced_by_dept_date", datepicker.Text.ToString());
_sqlCommand.Parameters.AddWithValue("@estmt_cst ", TextBox6.Text.ToString());
_sqlCommand.Parameters.AddWithValue("@prpsl_sts ", TextBox13.Text.ToString());
_sqlCommand.Parameters.AddWithValue("@prsnt_lctn ", TextBox7.Text.ToString());
_sqlCommand.Parameters.AddWithValue("@in_prss_sinc ", datepicker.Text.ToString());
_sqlCommand.Parameters.AddWithValue("@Event", "Add");
_sqlCommand.ExecuteNonQuery();
int result = Convert.ToInt32(_sqlCommand.ExecuteNonQuery());
if (result != 0)
{
Response.Write("<script language='javascript'>window.alert('Record Is Inserted Successfully');window.location='Index.aspx';</script>");
}
}
finally
{
CloseConnection();
DisposeConnection();
}
}
}
}