Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Web Controls (http://www.velocityreviews.com/forums/f63-asp-net-web-controls.html)
-   -   Help with vb.net Maths syntax in asp.net (http://www.velocityreviews.com/forums/t780298-help-with-vb-net-maths-syntax-in-asp-net.html)

Jamie Sutherland 10-25-2007 08:45 AM

Help with vb.net Maths syntax in asp.net
 
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 08:15 PM

Re: Help with vb.net Maths syntax in asp.net
 
On 25 Oct, 09:45, "Jamie Sutherland"
<ja...@n0spam.sutherlandwest.plus.com> wrote:
> 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


Hi Jamie

How about:

Dim x as integer = ATextBox.text

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

HTH




All times are GMT. The time now is 11:44 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.