Recommended: parse ASP without component upload, with progress bar, and multiple file uploads The following is the quoted content: Example.asp
1. The current date and time command is
<%=now%>
2. The method of ASP obtaining table data input is to use a built-in object—Request,
It varies from get to post.
3. If you want to write it yourself in VB or other language, the .dll file is for use by ASP, you must register the DLL file before: DOS
Enter regsbr32 *.dll
4. Show five repetitive sentences, the font is getting bigger and bigger
| The following is the quoted content: <% for i=1 to 5 %> <font size=<% =i %> color=#00ffff> Fast ASP </font> <br> <% next %> |
5. Transfer strings to user side
| The following is the quoted content: response.write string For example: <% response.write Welcome %> |
| The following is the quoted content: response.redirect url like: <% response.redirect homepage.asp %> |
* However, if the file content of this .ASP has been transferred to the user, an error will occur when redirect is used.
7. Combination of other languages and ASP:
For example: Good morning in the morning, Hello in the afternoon
| The following is the quoted content: <% if time> #12:00:00 AM# and time<#12:00:00 PM # Then greeting=Good morning! else greeting=Hello! end if %> <%=greeting %> |
8. Application of <script> tags in ASP
example:
| The following is the quoted content: <html> <body> <% call function1 %> </body> </html> <script runat=server language=javascript> function function1() { ... } </script> |
9.#include includes other files
<!--#include virtual|file=filename-->
virtual refers to the virtual file address.
file represents the absolute file address.
like:
<!--#include virtual=/booksamp/test.asp-->
<!--#include file=/test/test.asp-->
And it can be nested layer by layer. In addition, #include cannot be within <%--%>
10. Method of obtaining table input data
:GET POST
1.get: After the user adds the data to the URL, the format is? Field 1=Input data 1&Field 2=Input data 2&...,
Then send it to the server.
For example: action is www.abc.com, field Name input data is jack, field age data is 15, then use the get method
http://www.abc.com?Name=jack&Age=15
2.post: The user side uses http information data to transmit to the server
| The following is the quoted content: In ASP: get: Use input data = Request.QueryString (field name), and extract the data attached to the URL. post: Use input data =Request.Forml (field name), to read the HTTP information data field. * Request.QueryString Example For example: <A hery=aspform.asp?Name=jack&Age=15> Click here 〈/A〉〈p〉 Name:<%=request.QueryString(Name)%) Age:<%=request.QeueryString(Age)%) * get example ·aspturm.asp: <form action=asp1b.asp method=get> Name: <input type=text name=input1 value=Your name> <p> Features: <select name=input2> <option>cool! <option>handsome <option>warmhearted </select> <input type=submit value=ok> </form> Contents of asp1b.asp <html><body> <% =request.querystring(input1) %> hi, your character is <%= request.querystring(input2) %> </body></html> 11.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 to read in the same field, the range is from 1 to request.From(name).coun |
Share: How to get ASP to get the first image address in the code The following is the referenced content: 'Modify the pattern again' the code to be detected' http://www.knowsky.com/asp.asp'leixing html or ubb'nopic code does not have
3 pages in total Previous page 123 Next page