|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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, |
|
#2
|
||||
|
||||
|
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 |
|
#3
|
|||
|
|||
|
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 |
|
#4
|
|||
|
|||
|
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 |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > calculate from querystring |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|