Recommended: Detailed explanation of SQLSERVER stored procedures and calls Using SQLSERVER stored procedures can greatly improve program running speed and simplify programming and maintenance difficulties, and have been widely used. A stored procedure is actually a collection of Transact-SQL statements that can accept and return parameters provided by the user. A process can be created for permanent use, or temporarily used in a session (a partial temporary procedure), or
1. Method for obtaining table input data by ASP: GETPOST1.get: After the user adds the data to the URL, the format is? Field 1=Input data 1& Field 2=Input data 2&..., and then send it to the server. If: action is www.abc.com, field Name input data is jack, field age data is 15, then use the get method to http://www.abc.com?Name=jack&Age=15
2.post: The user uses http information data to transfer to the server ASP: get: Use input data = Request.QueryString (field name) to retrieve the data attached to the URL. post: Use input data =Request.Forml (field name), to read the HTTP information data field. *Request.QueryString Example: <Ahery=aspform.asp?Name=jack&Age=15>Click here </A>〈p>Name: <%=request.QueryString(Name)%)Age: <%=request.QueueryString(Age)%)*get Example·aspturm.asp:<formaction=asp1b.aspmethod=get>Name: <inputtype=textname=input1value=You rname><p>Features: <selectname=input2><option>cool!<option>handsome<option>warmhearted</select><inputtype=submitvalue=ok></form>asp1b.asp Content <html><body><%=request.querystring(input1)%>hi,yourcharacteris<%=request.querystring(input2)%>
</body></html>
2. Request.From syntax: request.From(name)[(index)|.count]name: Field name index: When multiple values are entered in the same field, the pointer value index specifies which value of the same field to be read. The range is from 1 to request.From(name).countcount: From request.From(name).count, we can know how many values are entered in the name field. If there is no such name field, the count is 0.
As shown in the following example: <%forI=1torequest.fron(input1).countresponse.writerequest.From(input1)(I)&<br>next%> If input1 has two values, both display *If index is not used to specify which one to read. Use <%foreachitemrequest.From(input))repomse.writeiteitem&<br>next%> You can also use foreachxintewuest.From to repeatedly get the input values of all fields.
<%foreachxinrequest.Form%>request.From(<%=x%)=<%=request.Form(x)%><br><%next%>
3. Method to obtain the client TCP/IP port: For example: tcp/ipportis<%=request(server_port)%> Use server_port to get the connection port information that receives HTTPrequest
4. Through the HTTP header information of HTTP_ACCEPT_LANGUAGE, the user's locale can be obtained. The following example determines the locale of the user and gives different pages. <%language=request.servervariables(HTTP_ACCEPT_LANGUAGE)iflanguage=enthen%><!--#includefile=english.asp><%else%><!--#includefile=china.asp><%endif%>
5. The current date and time command is <%=now%>
6. The method of ASP to obtain table data input is to use a built-in object—Request, which varies from get and post.
7. If you want to write it yourself in VB or other language, the .dll file for ASP must register the DLL file: enter regsbr32*.dll under DOS
8. Show five repetitive sentences, with larger and larger fonts <%fori=1to5%><fontsize=<%=i%>color=#00ffff>Fast ASP</font><br><%next%>
9. Transfer string to the user response.writestring, such as: <%response.writeWelcome%>
10. Link to the specified URL address response.redirecturl such as: <%response.redirecthomepage.asp%>
* However, if the file content of this .ASP has been transferred to the user, an error will occur when redirect is used.
11. Combination of other languages and ASP: For example: Good morning in the morning, Hello in the afternoon <%iftime>+#12:00:00AM#andtime<#12:00:00PM#thengreeting=Good morning!elsegreeting=Hello!endif%><%=greeting%>
Share: How to prevent access database from being downloaded First of all, if you just change the suffix name of the access database to .asp directly, it cannot prevent downloading. The correct way is to create a table and write a binary file, that is, an OLE object, to this table. The specific code is as follows: % DimDB,RS,SQL DB=DB.asp' Here is changed to your database, the suffix must be asp SetConn=Server.CreateObject(Adod
2 pages in total Previous page 12 Next page