VP-ASP :: Shopping Cart Software

Shopping Cart Software Solutions for anywhere in the World

US/Canada(Toll Free): +1 888 587 2278
Europe/UK: +44 (020) 7193 9408
Australia/New Zealand: +61 3 9016 4497

VP-ASP Shopping Cart Customer Forum

Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VPCart Forum
 Customization
 ASP Basics
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

chrisredco
VP-ASP Super User

282 Posts

Posted - August 26 2009 :  17:46:15  Show Profile  Visit chrisredco's Homepage  Reply with Quote
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
1898 Posts

Posted - August 26 2009 :  23:35:51  Show Profile  Visit devshb's Homepage  Reply with Quote
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
Go to Top of Page

devshb
Senior Member

United Kingdom
1898 Posts

Posted - August 26 2009 :  23:43:14  Show Profile  Visit devshb's Homepage  Reply with Quote
and here's an absolutely critical bit of info which anyone who's using html/asp/php or anything else that has text in it should know about:

How can I search for a text string reliably across all my files?:
http://www.bigyellowzone.com/support/issue_view.asp?ID=220

Simon Barnaby
Developer
[email protected]
www.BigYellowZone.com
Web Design, Online Marketing and VPASP addons
Go to Top of Page

chrisredco
VP-ASP Super User

282 Posts

Posted - August 27 2009 :  21:31:43  Show Profile  Visit chrisredco's Homepage  Reply with Quote
Thanks a bunch for all the help here.

Chris
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000