|
Purpose of Learning: basic sessionComponent, summary response,requestComponent. First of all, any program that has a membership system will use to detect whether the user has logged in this step. This is the session.Component, let's look at a code to illustrate. <% Session ("IsLogin") = "yes" %> The meaning of this sentence is to define a islogin string variable in the session, with a value of "yes", which can be assigned directly, without the need for a declaration. Is it simple? If we do the admin login system, first is a section of detection is not the administrator If is then Session ("ISAdmin") =yes " Else Session ("ISAdmin") = "No" End If At the front of each page that requires an administrator to see the top plus <% If not session ("isaadmin") = "yes" then Response.Redirect "Login.htm" %> This will not be possible for the average user to open this page. Explain the Response.Redirect, it is the meaning of turn, the back of the "login.htm" is the file to turn. This will not be able to see the subsequent content of the administrator. Here 's a summary of responseComponentThe basic is to use Response.Write (), Response.Redirect () is the function of writing strings and steering request basically is request.form (), Request.QueryString () is to accept the Post,get method of information came to the point here today, and finally my demonstration is a landing system you can study, basically is the above knowledge points relatively simple. |