ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 10th, 2003, 06:38 AM
adogfart adogfart is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 26 adogfart User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question calculate from querystring

hi all, pretty new at asp i'm wandering if it's possible to do what follows:

i'm getting from querystring *, /, - or +
like ...&calculate=*
now i want to use this in the calculation
like var1 calculate var2
how do i get it to understand that it's not a string but an actual calculation?

thx,

Reply With Quote
  #2  
Old October 10th, 2003, 08:27 AM
Utopia's Avatar
Utopia Utopia is offline
superficial
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2002
Location: Peterborough, England
Posts: 188 Utopia User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 36 m 8 sec
Reputation Power: 7
um, dont do it that way.

have a querystring like blah.asp?method=add

then use a select case statement that says

Select case Request.querystring("method")
Case add
result = var1 + var2
Case subtract
result = var1 - var2
[etc etc etc]
end select

Reply With Quote
  #3  
Old October 10th, 2003, 08:36 AM
adogfart adogfart is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 26 adogfart User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
thx for that quick response.write....lol

that's exactly the way that i did it in the end

but still....i was wondering if it couldn't be done shorter
now you have to code 4 times the same thing

i was really hoping i could get a calculating sign in a variableX

so i'd only need to code 1 line

number1 variableX number2

Reply With Quote
  #4  
Old October 10th, 2003, 09:56 AM
aspman aspman is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Ashburn,VA
Posts: 105 aspman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 22 m 40 sec
Reputation Power: 6
you may be able to get the symbol ( not a very good idea) .

Take a look at server.URlencode. or HTMLENCODE. you may have an answer there

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > calculate from querystring


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway