Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Help with vb.net Maths syntax in asp.net

Reply
Thread Tools

Help with vb.net Maths syntax in asp.net

 
 
Jamie Sutherland
Guest
Posts: n/a
 
      10-25-2007
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

 
Reply With Quote
 
 
 
 
Phil H
Guest
Posts: n/a
 
      10-25-2007
On 25 Oct, 09:45, "Jamie Sutherland"
<(E-Mail Removed)> 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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Maths in HTML Geoff HTML 10 01-06-2007 06:25 AM
Maths expression drawing library Ross Clement (Email address invalid - do not use) Java 4 10-02-2006 05:52 AM
Maths Involved Calum Maciver Java 5 02-19-2006 10:17 PM
bit of a maths quesiton Andrew Bullock C++ 2 02-05-2005 08:15 PM
thanx all now maths prob for offspring Kenneth Computer Support 12 12-07-2003 03:22 PM



Advertisments