Hello I'm trying to perfom insert operation in the code behind instead of using datasource but something is wrong and I don't know what it is, here is the code:
here is the Insert code:
protected void AddLayerDetailsView_Insert(object sender, DetailsViewInsertEventArgs e)
{
int selectedLayerId = Convert.ToInt32(ddlLayer.SelectedValue);
SqlConnection con = DataAccess.Connection.GetDBConnection();
string com = "Insert Into [ProductLayers] (layerId, productId, orig_sequence, pts, ptwa, tempThickness, sequence) Valuee (@layerId, @productId, @orig_sequence, @pts, @ptwa, @tempThickness, @sequence)";
SqlCommand sqlCmd = new SqlCommand(com, con);
//Get the inserted value
int eOrig_sequence = Convert.ToInt32(e.Values["orig_sequence"]);
double ePts = Convert.ToDouble(e.Values["pts" ...
Go to the complete details ...