Recommended: Several writing methods with the same characteristics as JScript on server VBScript This article demonstrates several important applications of ASP server-side scripts. Table of Contents: 1. Traverse collection/object 1.1 VBScript Traverse form collection 1.2 JScript Traverse form collection 2. Transform value of variables as variables, and assign value 2.1 VBScript Transform value of variables as variables
When the address bar does not have parameter "id":
| The following is the quoted content: Request.QueryString[ID] == null Convert.ToString(Request.QueryString[ID]) == null |
Note that this will cause an error:
Request.QueryString[ID].ToString();
When the address bar has parameter "id" but no assignment:
| The following is the quoted content: Request.QueryString[ID] == Request.QueryString[ID] == String.Empty Convert.ToString(Request.QueryString[ID]) == Convert.ToString(Request.QueryString[ID]) == String.Empty |
When judging two conditions at the same time:
| The following is the quoted content: if ( Request.QueryString[ID] == ) {...} if (( Request.QueryString[ID]).Length == 0) {...} |
Share: Solutions to the garbled problem when ASP reads SQL data If you cannot execute the SQL statement correctly when building a website, after response, you find that the Chinese fields in the SQL statement are garbled, you can use the following method to solve it: <%@ codepage=936%>Simplified Chinese<%@ codepage=950%>Traditional Chinese