Groups | Blog | Home
all groups > asp.net webcontrols > october 2007 >

asp.net webcontrols : Help with vb.net Maths syntax in asp.net


Jamie Sutherland
10/25/2007 12:00:00 AM
Hi,
I am trying to get my web app to do some maths...
The user enters a number in a textbox, then i want the app to deduct 2 from
every multiple of 12.
ie
12 =10
24 =20
36 =30
48 =40

and so on

Any one got any ideas on how i can do this?

Thanks in advance
Jamie
Phil H
10/25/2007 1:15:09 PM
On 25 Oct, 09:45, "Jamie Sutherland"
[quoted text, click to view]

Hi Jamie

How about:

Dim x as integer = ATextBox.text

if (x mod 12) = 0 then x -= 2

HTH

AddThis Social Bookmark Button