Common problems in ASP development of Dynamic Web page making technology

Source: Internet
Author: User
Tags date array expression functions month name variables square root variable
News | page | questions

<table style= "table-layout:fixed" width= "border=" 0 "cellspacing=" 0 "cellpadding=" 7 "bgcolor=" #f7f7f7 ">
<tr>
<TD style= "left:0px; width:100%; Word-wrap:break-word ">
Dffadfdaqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqsfdffadfdasfdffadfdasfdffadfdasfdffadfdasfdffadfdasfdffadfdasfdffad fdasfdffadfdasfdffadfdasf
</td>
</tr>
</table>

The main point here is to use CSS style control in the <table> tag has a style= "table-layout:fixed", which is described as follows

Grammar:

Table-layout:auto | Fixed

Parameters:

Auto: The default automatic algorithm. The layout will be based on the contents of each cell. The table is not displayed until each cell is read and calculated. The speed is very slow
Fixed: An algorithm for fixing the layout. In this algorithm, the horizontal layout is based only on the width of the table, the width of the table border, the spacing of the cells, the width of the columns, and the table contents, and in the <td> tag, if there is no Word-wrap:break-word style, the contents of the table will show only one part. Look at the width of the table. The word-wrap description is as follows:

Grammar:

Word-wrap:normal | Break-word

Parameters:

Normal: Allow content to top open specified container boundary
Break-word: Content will wrap within the boundary. If necessary, word wrapping (Word-break) will also occur.

VBScript Tag Index

Basic operations
+ numeric addition and string concatenation
-Digital Subtraction
* Digital Multiplication
/Digital Division
Mod Find the remainder
\ Quotient
& String Connection
^ The second party
= Equal
<> Not Equal
>= is greater than or equal to
> Greater than
<= less than or equal to
< less than
Not non-
And AND and
OR OR
Xor Exclusive OR

Cycle and decision making
If ... then ... The ...
If ... then...else ... The ... Non -
else If ... Not if
Select Case ... Group selection criteria
End Select
For ... next count loop
While...wend condition cycle (i)
Do while...loop condition cycle (ii)
Do...loop while condition Loop (iii)
Do Until...loop condition cycle (iv)
Do...loop until condition cycle (v)

Mathematical functions
ABS Absolute Value
SGN plus sign
Hex converted to hexadecimal
Oct converted into octal
SQR Square Root
int takes an integer
Fix takes an integer
Round to take an integer
Log with e as the base
Sin sine function
Cos cosine function
Tan tangent function

String handler function
Len String length
Mid Fetch Partial string
Left to take a partial string from the beginning of the string
Right takes a partial string from the end of a string
Lcase converted to lowercase
Ucase converted to uppercase
Trim clears the spaces at the beginning and end of the string
Ltrim clears the string at the beginning spaces
Rtrim clears the end of the string spaces
Replace replacement string Part character
Instr determine if it is contained in another string (from the start search)
InStrRev determine if it is contained in another string (search from the end)
Spaces of any character number in space
Any character of any number of characters in a String
StrReverse Reverse String
Split a string with a character

Data type Conversion Functions
Cint converted into plastic
The CSTR is converted into a string
Clng converted to regular integers
CBool Convert to Boolean function
Cdate Convert to date function
CSng Conversion to single precision
CDBL conversion to double precision

Date Time function
Date Now
Time now
Now date Time
DateAdd Date Added
DateDiff Two Date Difference
DateSerial Date Setting
DateValue Date Setting
Year now
Month now month
Day Now days
Hour Now the moment
Minute now minutes
Second now seconds
Timer midnight is seconds from now
TimeSerial Time setting
TimeValue Time Part
Weekday Week name
MonthName Month Name

Other functions
Array to produce arrays
ASC character ASCII code
CHR ASCII code characters
Filter Filtered Array
InputBox Input Window
Join merging elements in an array
MsgBox Information window
Lower bound of Lbound array
Upper bounds of Ubound array

Instructions
Const Set constant
Dim defines a variable or array
Erase Clear Array
ReDim the array again
Randomize Initial random number
Rnd obtain random number

ASP objects

Session Object
IsEmpty test Session variable exists
TimeOut set session variable life cycle
Abandon Force Clear Session variable

Application objects
IsEmpty test Application whether a variable exists
Lock Lock Application variable
Unlock Unlock lock command

Cookies Object
Expires set the life cycle of the cookie variable

Connection objects
Open to connect to the database
Execute opens the Recordset object
Close closes the Connection object

Recordset objects
MoveFirst move the record pointer to the first
MoveLast move the record pointer to the last one
MoveNext move the record pointer to the next
MovePrevious move the record pointer to the previous one
BOF test is the start of the recordset
Whether the EOF test is the end of the recordset
Open Recoreset Object
Close closes the Recordset object
Fields the child object reading the data
Number of Fileds.count fields
PageSize the number of record bars per page
AbsolutePage Set as a page
PageCount Total Pages
AbsolutePosition jump directly to a record
Microsoftvbscript Runtime Error List (10 binary representation)

Error # 5 Invalid procedure call or parameter
Error # 5 Invalid procedure call or parameter
Error # 6 Overflow
Error # 7 Not enough memory
Error # 9 subscript out of bounds
Error # 10 The array is fixed-length or temporarily locked
Error # 11 is 0 apart
Error # 13 Type mismatch
Error # 14 string space is not enough
Error # 17 Unable to perform the required operation
Error # 28 Stack Overflow
Error # 35 undefined procedure or function
Error # 48 Errors loading DLL
Error # 51 Internal errors
Error # 52 Wrong file name or number
Error # 53 File not found
Error # 54 Wrong file mode
Error # 55 file is open
Error # 57 Device I/O error
Error # 58 file already exists
Error # 61 disk is full
Error # 62 input exceeds end of file
Error # 67 Too many files
Error # 68 Device not available
Error # 70 No permissions
Error # 71 Disk not ready
Error # 74 cannot have other drive symbols when renaming
Error # 75 path/file access errors
Error # 76 Path not found
Error # 91 object variable not set
Error # The For loop is not initialized
Error # 94 Invalid use Null
Error # 322 cannot create the necessary temporary files
Error # 424 Missing object
Error # 429 ActiveX Parts Cannot create objects
Error # 430 class does not support automation operations
Error # 432 file name or class name not found in automation operation
Error # 438 object does not support this property or method
Error # 440 automation operation Errors
Error # 445 object does not support this operation
Error # 446 object does not support named parameters
Error # 447 object does not support current locale options
Error # 448 no named parameters found
Error # 449 parameter is required
Error # 450 Wrong number of arguments or invalid parameter property values
Error # 451 object is not a collection
Error # 453 The specified DLL function was not found
Error # 455 code resource lock errors
Error # 457 This key is already associated with an element of the collection
The error # 458 variable uses a automation type that is not supported in VBScript
Error # 462 The remote server does not exist or is not available
Error # 481 Invalid picture
Error # 500 variable undefined
Error # 501 Illegal assignment
Error # 502 objects cannot be safely programmed with Script
Error # 503 object cannot be safely initialized
Error # 504 objects cannot be created securely
Error # 505 invalid or unqualified reference
Error # 506 class not defined
Error # 507 An unexpected failure occurred
Error # 1001 Not enough memory
Error # 1002 Syntax errors
Error # 1003 missing ': '
Error # 1005 missing ' ('
Error # 1006 missing ') '
Error # 1007 missing '] '
Error # 1010 Missing identifier
Error # 1011 Missing ' = '
Error # 1012 missing ' If '
Error # 1013 missing ' to '
Error # 1014 missing ' end '
Error # 1015 lacks ' Function '
Error # 1016 missing ' Sub '
Error # 1017 missing ' Then '
Error # 1018 missing ' Wend '
Error # 1019 missing ' Loop '
Error # 1020 missing ' Next '
Error # 1021 missing ' case '
Error # 1022 missing ' Select '
Error # 1023 missing an expression
Error # 1024 Missing statement
Error # 1025 statement not ended
Error # 1026 Missing integer constant
Error # 1027 missing ' while ' or ' Until '
Error # 1028 missing ' while ' and ' Until ' or statement not ended
Error # 1029 missing ' with '
Error # 1030 identifier too long
Error # 1031 Invalid number
Error # 1032 Invalid characters
Error # 1033 string constants not ended
Error # 1034 Note not finished
Error # 1037 invalid use ' Me ' keyword
Error # 1038 ' Loop ' statement lacks ' do '
Error # 1039 Invalid ' exit ' statement
Error # 1040 loop control variable ' for ' is invalid
Error # 1041 name redefinition
Error # 1042 must be the first statement in the line
Error # 1043 cannot assign a value to the Non-byval parameter
Error # 1044 cannot use parentheses when calling subroutines
Error # 1045 missing literal constants
Error # 1046 missing ' in '
Error # 1047 missing ' Class '
Error # 1048 must be defined within a class
Error # 1049 missing let, Set or get in attribute declaration
Error # 1050 missing ' property '
Error # 1051 the number of variables must be the same in all attribute specifications
Error # 1052 multiple default properties/methods are not allowed in a class
Error # 1053 initialization or termination of class no variables
The set or let of the error # 1054 attribute must have at least one variable
Error # 1055 wrong ' Next '
Error # 1056 ' Default ' can only be specified in ' property ', ' Function ' or ' Sub '
Error # 1057 specifying ' Default ' must specify ' public ' at the same time
Error # 1058 can only specify ' Default ' in property gets
Error # 4096 Microsoft VBScript Compiler errors
Error # 4097 Microsoft VBScript run-time Error
Error # 5016 missing Regular Expression object
Error # 5017 Regular expression syntax errors
Error # 5018 the wrong number word
Error # 5019 missing '] ' in regular expression
Error # 5020 missing ') ' in 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 as not rs.eof

%>
<tr>
<TD height= "class=" leftlinks "><b><%if rs (" IsLeaf ") =0 then%><a href=" # "id")%>); return false "><%else%><a href=" <%=request. ServerVariables ("Script_name")%>?idtree=<%=rs ("Idtree")%> "><%end if%><%=server. HTMLEncode ((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 ("IDs") & "and slanguage=1 Order by TypeName"
Set Rs1=fgetrslist (strSQL)
Do as not rs1.eof
%>
<TR><TD height= "class=" Leftlinks ">
<a href=" <%=request. ServerVariables ("Script_name")%>?idtree=<%=rs1 ("Idtree")%>&id=<%=rs ("id")%> "><%=" Server. HTMLEncode ((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>



Related Article

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.