Working with variables in ASP
June 21, 2006
OK here's a short one, this example shows you how do the basics with variables, it demonstrates how to do a simple bit of maths on a shopping cart.
<%
dim vCART,vSHIPPING,vTOTAL
vCART = 47.99 'this variable would hold the total cart price including VAT, you would probably hold this information in a session variable but for this example I have hard coded the price in
vSHIPPING = 3.99
vTOTAL = vCART+vSHIPPING 'this variable will give the total price including shipping
%>
To write the total out on the web page all you have to do is:-
<%=vTOTAL%>
And thats it.
Entry Filed under: ASP. .
3 Comments Add your own
Leave a Comment
Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
Trackback this post | Subscribe to the comments via RSS Feed
1. srornzxkca | August 2, 2006 at 6:16 am
kuzyepzi
mlpctnzjm unicgnnbwu qfuffa
2.
donenet | August 2, 2006 at 9:10 am
? What
3.
John823 | October 22, 2009 at 12:30 am
Very nice site! is it yours too http://apeyixo.com/ysyrxqs/4.html