simple: calculations based on numbers from textboxes

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I would like to perform some calculations on data that is typed in textboxes
on my webpage. simple case: there are three textboxes; i would like to
calculate the product of the number in the first box * number in the second
box. Then i would like to display the result in the third textbox.

my question: how do i case the text from the boxes into the type 'int' so
that i could perform the calculation on them???? there must be a simple
solution for this!

Thanks for your time.
Ido
 
my question: how do i case the text from the boxes into the type 'int' so
that i could perform the calculation on them???? there must be a simple
solution for this!

call System.Int32.Parse(). In VB you can also use the built in CInt operator.


Mattias
 
Back
Top