FAQs in ASP and web development

Source: Internet
Author: User

Table Line Processing.

<Table Style = "table-layout: fixed" width = "200" border = "0" cellspacing = "0" cellpadding = "7" bgcolor = "# f7f7f7">
<Tr>
<TD style = "Left: 0px; width: 100%; Word-wrap: Break-word">
Bytes
Ffadfdasfdffadfdasfdffadfdasfdffadfdasf
</TD>
</Tr>
</Table>

The CSS style is used for control. In the <Table> label, there is a style = "table-layout: fixed", which is described as follows:

Syntax:

Table-layout: auto | fixed

Parameters:

Auto: the default automatic algorithm. The layout is based on the content of each cell. The table is displayed only after each cell is read and computed. Slow speed
Fixed: Fixed Layout Algorithm. In this algorithm, the horizontal layout is only based on the table width, the table Border width, the cell spacing, and the column width, but is not related to the table content, in this case, if the <TD> label does not contain the word-wrap: Break-word style, the content of the table can only be displayed in one copy. For details, see the width of the table. word-wrap:

Syntax:

Word-wrap: normal | break-word

Parameters:

Normal: allows the content to expand the specified container boundary.
Break-word: the content will wrap in the boundary. If necessary, the line feed (Word-break) also occurs.

VBScript tag Index

Basic operations
+ Number Addition and string connection
-Subtraction of numbers
* Number multiplication
/Digital Division
MoD evaluate the remainder
/Calculate the number of vendors
& String connection
^ Power
= Equal
<> Not equal
> = Greater than or equal
> Greater
<= Less than or equal
<Less
Not not
And
Or
XOR exclusive or

Loop and decision-making
If... then if... then...
If... then... else if... then... not
Else if... not if
Select case... group selection conditions
End select
For... Next count Loop
While... Wend condition loop (1)
Do while... loop conditional loop (2)
Do... loop while condition loop (3)
Do until... loop conditional loop (4)
Do... loop until conditional loop (5)

Mathematical functions
ABS absolute value
SGN plus and minus signs
HEX to hex
Convert Oct to octal
Square root of sqr
Int is an integer.
The fix is an integer.
Round is an integer.
Base-e log logarithm
Sin sine function
Cos cosine function
Tan tangent function

String processing functions
Len String Length
Partial string for mid
Left: Part of the string starting with the string
Right: extract part of the string from the end of the string.
Lcase to lowercase
Convert ucase to uppercase
Trim clears space characters at the beginning and end of a string.
Ltrim clears space characters starting with a string
Rtrim clears space characters at the end of a string
Replace to replace some characters in the string
Instr determines whether it is contained in another string (from the start search)
Rev judge whether it is contained in another string (search from the end)
Space characters of any number of characters
Any character of any number of characters in string
Strreverse reverse string
Split Splits a string by a character.

Data Type Conversion Function
CINT to integer
CSTR to string
Clng to a constant integer
Convert cbool to a Boolean Function
Cdate to date function
Csng to single precision
Cdbl conversion to dual precision

Date and Time Functions
Date current date
Time now time
Now Date and Time
Dateadd addition date
Datediff two date difference
Dateserial date setting
Datevalue date setting
Year current year
Month current month
Day
Hour current time
Minute now in minutes
Second current second
Timer midnight seconds from now
Timeserial time setting
Timevalue
Weekday week name
Monthname month name

Other functions
Array
Asc ascii code
Chr ascii characters
Filter Array
Inputbox input window
Join to merge elements in an array
Msgbox Information Window
Lower bound of the lbound Array
Upper Bound of ubound Array

Command
Const constant
Dim defines variables or Arrays
Erase clear Array
Redim redeclares the Array
Random Number starting from randomize
RND random number acquisition

ASP object

Session Object
Isempty
Timeout: sets the session variable lifecycle.
Abandon force clear session Variables

Application Object
Isempty
Lock application variable
Unlock: Unlock the lock command

Cookie object
Expires

Connection object
Open open connection to database
Execute to open the recordset object
Close close connection object

Recordset object
Movefirst moves the record pointer to the first
Movelast moves the record pointer to the last one
Movenext moves the record pointer to the next
Moveprevious move the record pointer to the previous
Whether Bof is the start of recordset
Whether the EOF test is the end of recordset
Open recoreset object
Close close the recordset object
The sub-object that fields reads data from.
Fileds. Count field count
Pagesize number of records per page
Absolutepage is set to a page
Total pagecount pages
Absoluteposition jump directly to a record
Microsoftvbscript runtime error list (in decimal format)

Error #5 invalid process call or Parameter
Error #5 invalid process call or Parameter
Error #6 Overflow
Error #7 insufficient memory
Error #9 subscript out of bounds
Error #10 the array is fixed or temporarily locked
Error #11 division by zero
Error #13 Type Mismatch
Error #14 insufficient string Space
Error #17 unable to perform the required operation
Error #28 Stack Overflow
Error #35 undefined process or function
Error #48 errors when loading DLL
Error #51 Internal error
Error #52 incorrect file name or number
Error #53 file not found
Error #54 incorrect file Mode
Error #55 file opened
Error #57 device I/O errors
Error #58 the file already exists
Error #61 the disk is full
Error #62 the input exceeds the end Of the file
Error #67 too many files
Error #68 the device is unavailable
Error #70 no permission
Error #71 the disk is not ready
Error #74 the name cannot contain other drive symbols
Error #75 path/File Access Error
Error #76 path not found
Error #91 object variable not set
Error #92 for loop not initialized
Error #94 invalid use null
Error #322 cannot create necessary temporary files
Error #424 the object is missing
Error #429 ActiveX parts cannot create objects
Error # category 430 does not support automation operations
Error #432 file name or class name not found in automation operation
Error #438 the object does not support this attribute or Method
Error #440 automation operation Error
Error #445 the object does not support this operation
Error #446 the object does not support named Parameters
Error #447 the object does not support the current region setting Option
Error #448 the named parameter is not found.
Error #449 parameters are required
Error #450 Number of incorrect parameters or invalid parameter attribute values
Error #451 the object is not a set
Error #453 the specified DLL function is not found.
Error #455 code resource locking Error
Error #457 this key has been associated with an element of this set
Error #458 the variable uses an automation type not supported in VBScript
Error #462 the remote server does not exist or is unavailable
Error #481 invalid image
Error #500 variable undefined
Error #501 invalid value assignment
Error #502 objects cannot be safely programmed using scripts
Error #503 objects cannot be safely initialized
Error #504 objects cannot be created safely
Error #505 invalid or unqualified reference
Error #506 class Not Defined
Error #507 an unexpected error occurs
Error # insufficient memory 1001
Error #1002 syntax error
Error #1003 missing ':'
Error #1005 missing '('
Error # ")" missing in 1006 ')'
Error # '] 'missing in 1007
Error #1010 the identifier is missing.
Error #1011 missing '='
Error # 'if' missing in 1012'
Error # 'to' missing in 1013'
Error # 'end' missing in 1014'
Error # 'function' missing in 1015'
Error # 'sub' missing in 1016'
Error # 'then' missing in 1017'
Error # 'wend' missing in 1018'
Error #1019 missing 'loan'
Error # 'Next' missing in 1020'
Error # 'case' missing in 1021'
Error #1022 'select' missing'
Error #1023 expression missing
Error #1024 the statement is missing
Error #1025 the statement has not ended
Error #1026 Integer constants missing
Error # "while" or "until" missing in 1027'
Error #1028 the 'while' and 'until' are missing or the statement is not ended
Error # 'with' missing in 1029'
Error #1030 the identifier is too long
Error #1031 Invalid Number
Error #1032 invalid characters
Error #1033 unended String constant
Error #1034 comments not completed
Error #1037 the keyword 'me' is invalid.
Error #1038 'login' statement missing 'do'
Error #1039 the 'exit 'statement is invalid.
Error #1040 the loop control variable 'for' is invalid
Error #1041 name redefinition
Error #1042 must be the first statement in the row
Error #1043 cannot be assigned a value for the non-byval parameter.
Error #1044 parentheses cannot be used to call a subroutine
Error #1045 text constants missing
Error # 'in' missing in 1046'
Error # 'class' missing in 1047'
Error #1048 must be defined inside a class
Error #1049 missing let, set, or get in the attribute Declaration
Error # 'properties' missing in 1050'
Error #1051 in all attribute specifications, the number of variables must be consistent
Error #1052 multiple default attributes/methods are not allowed in a class
Error #1053 class initialization or termination program no variable
Error # The set or let attribute must have at least one variable.
Error #1055 'Next'
Error #1056 'default' can only be specified in 'properties', 'function', or 'sub'
Error #1057 when 'default' is specified, 'public' must be specified at the same time'
Error #1058 you can only specify 'default' in property get'
Error #4096 Microsoft VBScript compiler Error
Error #4097 Microsoft VBScript runtime error
Error #5016 the regular expression object is missing.
Error #5017 regular expression syntax error
Error #5018 incorrect quantifiers
Error #5019 ']' is missing in the Regular Expression
Error #5020 ')' is missing in the regular expression ')'
Error #5021 character set out of bounds

Tree menu:

<Script language = "JavaScript">
VaR lastobj

Function expandit (OBJ)
{
If (lastobj! = NULL)
{
If (OBJ = lastobj)
{
If (obj. style. Display = "NONE ")
{
OBJ. style. Display = "";
}
Else
{
OBJ. style. Display = "NONE"
}
}
Else
{
Lastobj. style. Display = "NONE ";
OBJ. style. Display = "";
}
}
Else
{
OBJ. style. Display = "";
}

Lastobj = OBJ
}
</SCRIPT>

<Table width = "100%" border = "0" cellspacing = "0" cellpadding = "0">
<%
Dim ID
Id = request ("ID ")
Dim strsql, RS

Strsql = "select * From p_type where slanguage = 1 and typelevel = 1 order by typename"
Set rs = fgetrslist (strsql)
Do while not Rs. EOF

%>
<Tr>
<TD Height = "25" class = "leftlinks"> <B> <% if RS ("isleaf ") = 0 then %> <a href = "#" onclick = "javascript: expandit (kb <% = RS (" ID ") %> ); return false "> <% else %> <a href =" <% = request. servervariables ("script_name") %>? Idtree = <% = RS ("idtree") %> "> <% end if %> <% = server. htmlencode (right (RS ("typename") & ""), Len (RS ("typename") & "")-2 )) %> </a> </B> </TD>
</Tr>
<%
If clng (ID) = clng (RS ("ID") then

%>
<Tr id = "kb <% = RS (" ID ") %>">
<%
Else

%>

<Tr id = "kb <% = RS (" ID ") %>" style = "display: none;">
<%
End if
%>
<TD>
<Table>
<%
Dim RS1
Strsql = "select * From p_type where parentid =" & RS ("ID") & "and slanguage = 1 order by typename"
Set RS1 = fgetrslist (strsql)
Do while not rs1.eof
%>
<Tr> <TD Height = "20" class = "leftlinks">
<a href = "<% = request. servervariables (" script_name ") %>? Idtree = <% = RS1 ("idtree") %> & id = <% = RS ("ID") %> "> <% = server. htmlencode (right (RS1 ("typename") & ""), Len (RS1 ("typename") & "")-2 )) %> </a> </TD> </tr>
<%
Rs1.movenext
Loop
Rs1.close
Set RS1 = nothing
%>
</Table>
</TD>
</Tr>
<%
Rs. movenext

Loop
Rs. Close
Set rs = nothing
%>
</Table>

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.