Tải bản đầy đủ (.pdf) (3 trang)

Tài liệu MICROSOFT ACTIVE SERVER PAGES 3.0 pdf

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (240.31 KB, 3 trang )

A Practical Guide to
By
Manas Tungare
www.manastungare.com
Active Server Pages
Microsoft
3.0
ACTIVE SERVER PAGES 3.0
2
About this guide ...
This practical guide was prepared as a reference for the ASP Workshop
conducted by Manas Tungare at Fr. Conceicao Rodrigues College of
Engineering in October 2000.
The examples and samples used in this guide can be found on the web at:
/>Thanks to Pankaj Kamat for proofreading this document.
Copyright © 2000, Manas Tungare.
/>Every effort has been made to ensure correctness & reliability of the
information provided, however the author may not be held responsible for any
errors that may have crept in.
ACTIVE SERVER PAGES 3.0
3
INTRODUCTION 6
THE NEED FOR ASP 6
SO WHAT IS ASP ? 6
WHAT CAN YOU DO WITH ACTIVE SERVER PAGES? 7
WHAT DO SERVER-SIDE SCRIPTS LOOK LIKE? 7
WHAT YOU NEED TO RUN ASP 7
INTERNET INFORMATION SERVICES 7
PERSONAL WEB SERVER 8
BEFORE YOU BEGIN … 8
STEPS FOR INSTALLATION 8


CREATING VIRTUAL DIRECTORIES 8
ACCESSING YOUR WEBPAGE 8
WHAT IS LOCALHOST? 9
HELLO, WORLD (AND MORE …) ! 10
ANOTHER WAY … 10
DISPLAYING THE DATE … 11
… AND MORE 11
VARIABLES AND CONSTRUCTS 13
DIM ‘EM FIRST 13
THE BIG IF 14
FOR-NEXT LOOPS 16
FOR EACH OBJECT IN COLLECTION ... 18
WHILE ... WEND 18
SELECT CASE: 19
COMPLEX CONDITIONS & CONNECTIVES: 19
AND, OR AND NOT 19
SUBROUTINES, FUNCTIONS AND INCLUDES 20
SUBROUTINES 20
FUNCTIONS 20
INCLUDES 21
THE OBJECT MODEL 23
THE REQUEST OBJECT 23
SYNTAX 24
COLLECTIONS 24
METHODS 24
NOTE 24
REQUEST.SERVERVARIABLES 25
THE RESPONSE OBJECT 26
SYNTAX 26
COLLECTIONS 26

PROPERTIES 26
METHODS 27
THE SERVER OBJECT 28
SYNTAX 28
PROPERTIES 28
METHODS 28
THE SESSION OBJECT 28
SYNTAX 29
COLLECTIONS 29
PROPERTIES 29
METHODS 29
EVENTS 29
THE APPLICATION OBJECT 29
SYNTAX 30
COLLECTIONS 30
EVENTS 30
HANDLING USER INPUT : FORMS & QUERYSTRINGS 31
ACTIVE SERVER PAGES 3.0
4
THE REQUEST.FORM COLLECTION 31
THE REQUEST.QUERYSTRING COLLECTION 32
GET AND POST 33
WHEN TO USE GET? 33
WHEN TO USE POST? 33
DATA MANIPULATION USING ASP 34
DISPLAYING DATA FROM A TABLE 34
RETRIEVING DATA 35
MOVING ON TO COMPLEX QUERIES 38
INSERTING DATA INTO A TABLE 38
UPDATING RECORDS 39

DELETING RECORDS 40
MORE ... 40
VBSCRIPT REFERENCE 41
STATEMENTS AND KEYWORDS 41
OPERATORS 41
VBSCRIPT FUNCTIONS 42
TYPE CHECKING FUNCTIONS 42
VALUE 42
CONSTANT 42
DATA TYPE 42
TYPECASTING FUNCTIONS 43
FORMATTING FUNCTIONS 44
MATH FUNCTIONS 44
DATE FUNCTIONS 45
DATE CONSTANTS 45
DAY OF THE WEEK CONSTANTS 46
STRING FUNCTIONS 46
OTHER FUNCTIONS 48
CONTROL STRUCTURES 48
SQL REFERENCE 52
THE SELECT STATEMENT 52
INNER AND OUTER JOIN STATEMENTS 53
CALCULATED VALUES AND THE GROUP BY CLAUSE 54
THE INSERT STATEMENT 54
THE UPDATE STATEMENT 55
THE DELETE STATEMENT 56
ACTIVEX DATA OBJECTS (ADO) REFERENCE 57
THE CONNECTION OBJECT 57
OPENING A DATABASE CONNECTION 57
THE CONNECTMODEENUM CONSTANTS 58

THE CONNECTIONSTRING 58
THE CONNECTION.EXECUTE METHOD 60
MANAGING TRANSACTIONS WITH A CONNECTION OBJECT 60
THE RECORDSET OBJECT 61
USING THE RECORDSET.OPEN METHOD 61
POSITIONING A RECORDSET OBJECT — THE MOVE METHODS 63
RECORDSET SORTING AND SEARCHING METHODS 64
THE FIELD OBJECT 65
EXTENDING ASP : COM COMPONENTS 66
THE BASICS 66
PROPERTIES 66
METHODS 67
ARGUMENTS 67
COLLECTIONS 68
THE DEFAULT METHOD OR PROPERTY 69
ACTIVE SERVER PAGES 3.0
5
INSTANTIATING AN OBJECT 69
BUILT-IN COM OBJECTS 70
PROGID 70
FURTHER ON ... 70
COPY & PASTE ASP SCRIPTS 71
FEEDBACK PAGE 71
TELL A FRIEND ABOUT THIS SITE 72
FURTHER EXAMPLES 73
THE ASP RESOURCE GUIDE 74
EDITORS 74
TEXTPAD 74
MICROSOFT VISUAL INTERDEV 74
ALLAIRE HOMESITE 74

AUGUST WIND ASP EXPRESS 74
EASYASP - SHAREWARE, BY ERIK BANKER. 75
ASP HOSTING 75
DOMAINDLX 75
BRINKSTER 75
SOFTCOM TECHNOLOGIES 76
COM COMPONENTS FOR USE WITH ASP 77
ASPEMAIL 77
JMAIL 78
ASPUPLOAD 78

×