Golang Tutorials - Learn Go Programming with Easy Step-by-Step Guides

Explore comprehensive Golang tutorials for beginners and advanced programmers. Learn Go programming with easy-to-follow, step-by-step guides, examples, and practical tips to master Go language quickly.

Asp Quick Ref in ASP

Asp Quick Ref in ASP

Sure! Here's a quick reference cheat sheet for Classic ASP (VBScript) essentials to help you get started or refresh quickly:


Classic ASP Quick Reference


1. Basic Syntax

<% ' VBScript code block    Response.Write "Hello World"%>

2. Variables

Dim namename = "Alice"Response.Write name

3. Comments

' This is a comment

4. Data Types

  • String, Integer, Double, Boolean, Date, Object, Variant (default)

  • No explicit declaration needed.


5. Operators

OperatorMeaning
+Addition/Concat
-Subtraction
*Multiplication
/Division
=Assignment
&String concat
And, OrLogical ops

6. Control Structures

If...Then...Else

If x > 10 Then    Response.Write "Greater than 10"Else    Response.Write "10 or less"End If

Select Case

Select Case color    Case "Red"        Response.Write "Stop"    Case "Green"        Response.Write "Go"    Case Else        Response.Write "Wait"End Select

7. Loops

  • For...Next

For i = 1 To 5    Response.Write i & "<br>"Next
  • For Each...Next

For Each item In collection    Response.Write item & "<br>"Next
  • Do While

Do While condition    ' codeLoop

8. Functions & Subs

Sub SayHello(name)    Response.Write "Hello " & nameEnd SubFunction Add(a, b)    Add = a + bEnd FunctionSayHello("Bob")Response.Write Add(5, 3)

9. Common Objects

ObjectPurpose
RequestGet form/query/cookie data
ResponseSend output to client
ServerUtilities like CreateObject
SessionStore per-user data
ApplicationStore global app data

10. Form Handling

<form method="post" action="process.asp">    Name: <input name="username" />    <input type="submit" /></form><!-- process.asp --><%Dim namename = Request.Form("username")Response.Write "Hello " & Server.HTMLEncode(name)%>

11. Include Files

<!--#include file="header.asp" -->

12. Database Example (using ADO)

<%Dim conn, rs, sqlSet conn = Server.CreateObject("ADODB.Connection")conn.Open "your_connection_string"sql = "SELECT * FROM users"Set rs = conn.Execute(sql)Do While Not rs.EOF    Response.Write rs("username") & "<br>"    rs.MoveNextLooprs.CloseSet rs = Nothingconn.CloseSet conn = Nothing%>

13. Session Example

Session("UserName") = "Alice"Response.Write "Welcome, " & Session("UserName")

14. Error Handling

On Error Resume Next' risky code hereIf Err.Number <> 0 Then    Response.Write "Error: " & Err.Description    Err.ClearEnd IfOn Error GoTo 0

If you want a more detailed cheat sheet on any of these topics or others like FileSystemObject, Cookies, or Application Events, just ask!

Disclaimer for AI-Generated Content:
The content provided in these tutorials is generated using artificial intelligence and is intended for educational purposes only.
html
docker
php
kubernetes
golang
mysql
postgresql
mariaDB
sql