protected void calcMonthlyIncome()
{
appl_annualIncome = Convert.ToInt32;
appl_monthlyIncome.Text = appl_annualIncome/12;
}
What I need to know is in my text box how do I call the method/function once the user keys off or tabs off the text box(appl_annualIncome) he entered data into and set focus on the next textbox(appl_monthlyIncome) that will hold the calculated results.
Am new to the .net world - would appreciate any guidance. Thank you
swtlbeePosted May 30, 2009, 6:21 PM
CODE BEHIND:
protected void calcMonthlyIncome(object sender, EventArgs e)
{
decimal annualIncome;
annualIncome = Convert.ToDecimal(appl_annualIncome.Text);
appl_monthlyIncome.Text = Convert.ToString(annualIncome/12);
}
JayPosted Jul 15, 2009, 3:25 AM
Niradhip ChakrabortyPosted Jun 1, 2009, 4:49 PM
or if you want to do it in pagebehind then follow the code:
.aspx code:
.cs code
protected void txtCity_TextChanged(object sender, EventArgs e)
{
// your onblur code should come here
}