Prestwood eMag
Our monthly opt-in coupons+newsletter.
|
portal.prestwood.com
|
|
July 2012 - ASP Classic Edition
|
Year 14 Issue 7
|
|
|
|
Your full service technology partner!
|
|
Expert guidance from working professionals!
Prestwood IT Events topic:
Prestwood IT @ Golf Tournament, 2nd Year!On Monday August 20th, Prestwood IT sponsored a tee at the Annual Past Chair's Golf Tournament which is put on by the Citrus Heights and Fair Oaks chambers. If you golf and missed this event, you missed a gorgeous day!
Language Basics topic (classic post):
Send email with ASPMail by Mike Prestwood
How to use ASPMail to send email from your web site.
|
Monthly ASP Classic Lesson
|
|
Language Basics Topic:
Code Snippet of the Month
Call randomize then call Rnd to generate a random number between 0 and 1. The following generates a random number from the low to high number including the low and high numbers:
Function GetRandomInt(LowNumber, HighNumber) RANDOMIZE GetRandomInt = Round(((HighNumber-1) - LowNumber+1) * Rnd+LowNumber) End Function
Response.Write GetRandomInt(10, 100)
ASP Classic Topic:
Error: error 'ASP 0208 : 80004005'
Cannot use generic Request collection
/_private/footer_content.inc, line 72
Cannot use the generic Request collection after calling BinaryRead.
Explanation: Although you can use the generic request collection, as in Request("SomeValue"), for either Request.Form("SomeValue") or Request.QueryString("SomeValue"), it's best to avoid the generic request collection until it's really needed. The generic request collection causes problems in some circumstances. For example, you cannot call the generic request collection after a BinaryRead.
ASP Classic Topic:
Resource Link of the Month: VBScript Language Reference on Microsoft.com
The best resource for quickly looking up ASP Classic commands. Even better than having a reference book.
Language Details Topic:
Question: What is the syntax in ASP Classic for using an associative array?
Answer: Use a dictionary:
Dim StateList
set StateList = Server.CreateObject("Scripting.Dictionary")
StateList.Add "CA", "California"
Response.Write "NV is " & StateList("NV") For more examples, refer to our ASP Classic Associative Array (Scripting.Dictionary) article.
Language Details Topic:
Tip of the Month
Although you can use the generic request collection, as in Request("SomeValue"), for either Request.Form("SomeValue") or Request.QueryString("SomeValue"), it's best to avoid the generic request collection until it's really needed. Use a For Each loop to loop through elements.
|
|
|