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
Develop Shailendra
NA
42
3.3k
On button click add element to grid view using List
Sep 24 2016 8:27 AM
List<DOBillDetails> listDOBillDetails = new List<DOBillDetails>();<br /><br /> protected void btnAdd_Click(object sender, EventArgs e)<br /> {<br /><br /> try<br /> {<br /> <br /><br /> DOBillDetails objDOBillDetail = new DOBillDetails();<br /> objDOBillDetail.ProductId = Convert.ToInt32(ddProductName.SelectedValue);<br /> objDOBillDetail.Description = Convert.ToString(txtDescription.Text);<br /> objDOBillDetail.Unit = Convert.ToInt32(txtUnit.Text);<br /> objDOBillDetail.Qty = Convert.ToInt32(txtQty.Text);<br /> objDOBillDetail.UnitPrice = Convert.ToInt32(txtUnitPrice.Text);<br /> objDOBillDetail.TaxPer = Convert.ToString(txtTaxPer.Text);<br /> objDOBillDetail.Discount = Convert.ToString(txtDiscount.Text);<br /> objDOBillDetail.Total = Convert.ToInt32(txtTotal.Text);<br /><br /> listDOBillDetails.Add(objDOBillDetail);<br /><br /> //dtgBill.DataSource = objBLLBillDetails.FillGrid(ddProductName.SelectedValue, txtDescription.Text, txtUnit.Text,<br /> //txtQty.Text,txtUnitPrice.Text, txtTaxPer.Text, txtDiscount.Text, txtTotal.Text);<br /> dtgBill.DataSource = listDOBillDetails;<br /> dtgBill.DataBind();<br /> }<br /> catch (Exception ex)<br /> {<br /> throw;<br /> }<br /> }
Reply
Answers (
2
)
lable text not displaying as an expression
getting this error in MVC5