ASP full lecture ~~ Hehehe ~ Summer vacation, I want to give birth! ... -% ¥% ... ¥¥ # ... - *
For our Flash, slightly learn the ASP ~ (To bear it ~) Because this thing is actually useful, it is quite big. Or is it explained as an example as an example. This time, we use the ASP, so it is more clear about the contrast of Flash's Action, I also try to make the basics of the two, and the advantages of the ASP will be out of date! ^ _ ^
Sorry, first, you must go to ASP's grammatical class. (Hello, learning is actually not bad, don't lose something!)
Because ASP uses VB Script and JScript, there are <% and%> in the ASP format, which is the simplest combination of Scripts
Methods.
First, a lot of people have been touched, familiar with:
<%
Response.write ("Hello World!")
%>
body>
html>
The above is the simplest Hello World Example, his role is to output a Hello World to the browser. You can see that ASP only uses one sentence, which is <% response.write ("Hello World!")%> . The response here is one of the basic five major objects of the ASP, in fact, the Document.Write feature in RESPONSE.WRITE and JavaScript is the same - all output to the browser. As for html, I think I don't want to say it ~~
Ok, let me talk about the five major objects of the ASP. These things can be used for websites. I am like a questionnaire, counter, password verification, dynamic collection user information, etc., how, is it? Oh ~
Let's start with Response.
1. Response.write
The most commonly used is the response.write we used, this thing will make the browser output. Because of common use, it is simplified by Gates old. That is, <% response.write ("Hello World!")%> Can be short-handed into <% = ("Hello World")%>.
2. Response.Redirect
This is our common website steering function. Need not to pay attention to anything to the browser before response.Redirect, (of course, html) this is because response.redirect is the next command to let the browser action, and response.write or html is to make your browser Things, this creates a conflict.
The syntax is simple: response.redirec "ab";
AB here is the page you want to turn to "* .htm (ASP, SWF, JSP, PHP ...)"
But remember this is ASP, don't forget to add <% and%> two brothers.
3.Response.end
Ha ha ~ too simple, this is to stop to the browser.
This time I came here ~ The next four major objects were left. Ha ha ~ I hope to continue to pay attention ~
Ok, pick up the section. Today is going to say the request of the four objects of the ASP.
Request is more important to get data from the client. I think this is also the main use of most websites.
There are three ways: request.form / request.QueryString and Request. Let's take a look at the Form method.
This method is a common method of ASP because the table is indeed a good way to get user information. FORM has two different submission methods, one is POST, the other is Get. Where did you have seen it? Looking at the eyes? Yes, the third election in Loadvariables in Flash is not "post" or "get"? Yes, I have to use this loadvariables in the future.
for example:
TEA.ASP: Collection Information
hEAD>