Unable to cast object of type 'System.Web.UI.WebControls.TextBox' to type 'System.IConvertible'.
public partial class caltxt : System.Web.UI.Page { double amt1; double exc; public void Page_Load(object sender, EventArgs e) { } public void txtamt_TextChanged(object sender, EventArgs e) { amt1 = Math.Round(Convert.ToDouble (txtamt)); //decimal PercentageRate = Convert.ToDecimal(this.txtamt.Text); } protected void txtexc_TextChanged(object sender, EventArgs e) { double exc = Math.Round (Convert.ToDouble(this.txtexc.Text)); // decimal temp = (Math.Round(Convert.ToDecimal(txtexc.Text) / Convert.ToDecimal(txtamt.Text)*100)); // txttotalexc.Text = temp.ToString(); } protected void txttotalexc_TextChanged(object sender, EventArgs e) { double totat = Math.Round (Convert.ToDouble(exc) /100)* Convert.ToDouble(amt1); //+ Convert.ToInt32(this.txtexc.Text); this.txttotalexc.Text = totat.ToString(); } }
Quote:amt1 = Math.Round(Convert.ToDouble (txtamt));
amt1 = Math.Round(Convert.ToDouble (txtamt.Text));
Quote: double totat = Math.Round (Convert.ToDouble(exc) /100)* Convert.ToDouble(amt1); //+ Convert.ToInt32(this.txtexc.Text); this.txttotalexc.Text = totat.ToString();
txtexc_TextChanged
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)