Textbox to Label w/No Button

fenhow

Registered User.
Local time
Today, 15:47
Joined
Jul 21, 2004
Messages
599
Is is possible to take a number placed in a textbox, multiply it by a number and show the result in another textbox or on a label without using a button?

I am using Visual Studio 2008, coding in VB.

Thanks!

Fen How
 
Thanks,

What I am trying to do is when a user enters a number say 100 in a textbox, to have that number multiply by say .585 and show the result in another textbox or on a label so they can quicky calculate their mileage.

It works fine with a button howeve where i want to place the code is in an ASP UPDATE PANEL that is databound, whenever I try to run the code by clicking the button I get errors.

If I paste this code outside of the ASP UPDATE PANEL it works fine, it is just not where I want it to be.

Protected Sub Button3_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button3.Click

' Create some variables to hold our values

Dim intNum1 As Integer



' Parse our textboxes into integer values

intNum1 = Integer.Parse(TextBoxInsertMileage.Text)



' Set label1 to add the numbers

Label10.Text = intNum1 * 0.585

End Sub

End Class
 

Users who are viewing this thread

Back
Top Bottom