chrisredco
VP-CART Super User
282 Posts |
Posted - August 26 2009 : 17:46:15
|
I'm finding more an more I need some basic knowledge in ASP to do things in VPASP. More times than not, the answer to my problems are altering code in some way.
Any suggestions on the best place to start getting some basic knowledge on this?
Thanks, Chris Stubbs Redco Audio |
|
devshb
Senior Member
United Kingdom
1904 Posts |
Posted - August 26 2009 : 23:35:51
|
asp is essentially a microsoft thing, and it uses vbscript as its scripting language.
This is the microsoft link which is like a massive online reference manual of how it all works: http://msdn.microsoft.com/en-us/library/t0aew7h6%28VS.85%29.aspx
The "user's guide" link on that page explains the basics, and the "language reference" link on that page explains the nitty-gritty syntax of the various vbscript functions etc.
In asp files, anything between <% and %> tags are the scripting/programming side, and anything outside those tags are regarded as being straight-forward html that gets output'd directly to the browser as-is.
when you see something like this inside asp files for embedded html:
Hello <%=yournamevariable%>
the = sign is like a shortcut when next to the <% tag, and it actually equates to:
Hello <% Response.Write yournamevariable %>
If you want to output a double-quote to the browser within vbscript, then double it up or use chr(34), eg:
<% Response.Write "Testimonial: ""this is cool"", said Bob from the UK" %>
or:
<% Response.Write "Testimonial: "&chr(34)&"this is cool"&chr(34)&", said Bob from the UK" %>
the & character in vbscript is the concatenation/joining command to splice two strings together.
normally you'd use the html quot special character instead in that instance, but double-quote literals are often needed for things like outputting fields too eg: <input type="blah.... etc
asp/vbscript is a very common language, so if you have any how-to questions that you can't easily work out from the microsoft manual, just post here; there'll be 100's of people here who'd be happy to post a solution for most things.
Remember; no question is too simple; it's often the most simple things that are hard to find out from manuals (eg "what's the difference between "sub" and "function" ?)
Simon Barnaby Developer [email protected] www.BigYellowZone.com Web Design, Online Marketing and VPASP addons |
Edited by - devshb on August 27 2009 00:05:58 |
|
|