This is my line.
TextBox txtSingleUnitPrice = ((TextBox)gvSender.Rows[e.RowIndex].FindControl("txtSingleUnitPrice"))?(TextBox)gvSender.Rows[e.RowIndex].FindControl("txtSingleUnitPrice"):0;
Error name is Cannot implicitly convert type 'System.Web.UI.WebControls.TextBox' to 'bool'..Please Help me.How to correct this error
Cannot implicitly convert type
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Vithal WadjeRank #19 · 47.2K pointsPosted Apr 7, 2015, 9:51 AM EDT
TextBox txtSingleUnitPrice = ((TextBox)gvSender.Rows[e.RowIndex].FindControl("txtSingleUnitPrice"))?(TextBox)gvSender.Rows[e.RowIndex].FindControl("txtSingleUnitPrice"):0 as TextBox ;
aravinth kandasamy57 pointsPosted Apr 7, 2015, 8:47 PM EDT