TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Rubiya Rajamanickam
NA
64
3.8k
qty,total cost gridview column not insert database
Apr 20 2016 8:07 AM
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
Reply
Answers (
29
)
How to create url rewriting in asp.net?
.cshtml not working