Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
29
Reply
qty,total cost gridview column not insert database
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
Rubiya Rajamanickam
8y
594
1
Reply
protected void btnSubmit_Click(object sender, EventArgs e)
{
foreach (GridViewRow g1 in GridView1.Rows)
{
SqlConnection con = new SqlConnection(ConStr);
SqlCommand com = new SqlCommand("insert into tblTotal(Product_Name,MRP,Salon_Cost,Qty,Total_Cost) values ('" + g1.Cells[0].Text + "','" + g1.Cells[1].Text + "','" + g1.Cells[2].Text + "','" + g1.Cells[3].Text+ "','" + g1.Cells[4].Text + "')", con);
con.Open();
com.ExecuteNonQuery();
con.Close();
}
}
this my code. the quantity and total cost enter the run time using jquery but the two column values not insert the database
Post
Reset
Cancel
Answers (
29
)
Next Recommended Forum
How to create url rewriting in asp.net?
.cshtml not working