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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Sanjeeb LenkaRank #301 · 8.3K reputationPosted May 4, 2015, 11:04 PM EDT
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();
}
Dipankar BiswasRank #992 · 2K reputationPosted May 4, 2015, 11:10 PM EDT
check attached...
Dipankar BiswasRank #992 · 2K reputationPosted May 4, 2015, 10:39 PM EDT
See this link...http://www.nullskull.com/q/10305778/multiply-two-textbox-values.aspx
Thanks...
Khargesh RajputRank #616 · 3.9K reputationPosted May 4, 2015, 10:43 PM EDT
Sanjeeb LenkaRank #301 · 8.3K reputationPosted May 4, 2015, 10:49 PM EDT
Abhay Singhania37 reputationPosted May 4, 2015, 10:54 PM EDT
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
Abhay Singhania37 reputationPosted May 4, 2015, 11:17 PM EDT