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
ramya t
NA
130
6.8k
store gridview footer row to gridview
Feb 3 2017 6:48 AM
hi,
I am using gridview which contains html input textbox rather than asp:textbox,
how to refer the id from gridview and how to store this textbox values to gridview.
i have attached my code here.please help me to resolve this problem.
<FooterTemplate>
<input type='text' id="totalcost" name='TC' class='textbox'/><br /><br />
<input type='text' id='finalcost' name='FC' class='textbox' />
</FooterTemplate>
c# coding
HtmlInputText rc = ((HtmlInputText)gridView.FooterRow.FindControl("totalcost"));
HtmlInputText fpoc = ((HtmlInputText)gridView.FooterRow.FindControl("finalcost"));
MySqlCommand cmd = new MySqlCommand("insert into received values('" + l1.Text + "','" + lsid.Text + "','" + lod.Text + "','" +lf.Value + "','" + rc+ "','" +fpoc + "')", con);
cmd.CommandType = CommandType.Text;
con.Open();
cmd.ExecuteNonQuery();
ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('Received sucessfully');window.location ='ReceivedProduct.aspx';", true);
con.Close();
output
O.No S.id date pcost Rejectcost Final pcost
PO1000101
Supp1
24/11/2016
850
?
?
after that code executed the above output will displayed,i need rejected cost and final cost value also.
Reply
Answers (
3
)
Syntaxerror missing operator in query expression SN='. Invb6
How to merge or combine two combobox in one comb box