i have two text box txtunits and txttotalamt..
on the leave event of txtunits the total amount should get calculated and displayed on txttotalamt..
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sanjeeb LenkaPosted May 5, 2015, 3:04 AM
protected void txtunits_TextChanged(object sender, EventArgs e)
{
int i=100;
if(txtunits.Text!=null && txtunits.Text!=string.Empty)
txttotalamt.text=(Conver.ToInt32(txtunits.Text)*I).ToString();
}
Abhay SinghaniaPosted May 5, 2015, 3:17 AM
Dipankar BiswasPosted May 5, 2015, 3:10 AM
check attached...
Abhay SinghaniaPosted May 5, 2015, 2:54 AM
if the user enters the 10 in txtunit, the amount shld get caculated and displayed on txttotalamt after multiplying.
the link u shared has 3 textbox.
i m working with 2.
if the entered units on txtunits is 10 n the constant amt is 100 the multiplication should get displayed on txttotalamt
i was trying int i=100;
txttotalamt.text=txtunits.text* convert.tosrting(i);
but it is displaying an error that * cannot b used
Sanjeeb LenkaPosted May 5, 2015, 2:49 AM
Khargesh RajputPosted May 5, 2015, 2:43 AM
Dipankar BiswasPosted May 5, 2015, 2:39 AM
See this link...http://www.nullskull.com/q/10305778/multiply-two-textbox-values.aspx
Thanks...