????? ???? ???? ?? ??????? ????? ?????? ??????

?????? ????????? ?????? ?????????
???? ???????: 175167 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

?? ??? ??????

??????

????? ??? ??? ????? ???? ?????? (ASP) ????? ????? ?????? ??????? ???????? ?????? ??????? ??? ????????. ???? ??? ??? ????? ????????? ?? ASP ??????. ??? ??????? ??????? ????? ?????? ?????? ?????? ???? ??? ?? ??? ????????? ???????? ?????? ????????? cons ??? ????.

??????? ????

???? ????? "?" ??????? ???????

??? ???? ???? ?

??? ????? ??????? ???? ????? "?" ??????? ??? ??????. ?? SessionID ????? ?? ??? ???? ??? ASP ????? ?????? ?? ??????? ???? ?? ?????? ??? ?????? ?????? ??????? ???? ?????. ????? ????? ??? ?? ???? ??? ?????? ????? ????? ???????? ???? ?? ??????? ?? ???????? ???? ?????????? ????? ?????.

?????????

  • ?? ????? ????? ??? ???????.
  • ????? ????? ??????? ??????? ????? ????????? (??? ????? ?? ?? ?????? ???????? ??? ??????).
  • ??? ????? ????? ??????? ?? ???? ?????????? ????????? ?? ????????.

cons

  • ????? ??? ??????? ?? ????? ????? ????? ????? ???????? ???? ?? ??????? ?? ?????? ???.
  • ?? ???? ?????? ??? ??????? ?????? ??? ???????? ?? ?????? ?????? ?? ??? ??? ?????? ????????.
  • ??? ??????? ?????? ????????? ??? ???? ???. ??? ????? ?????? ??????? ????????: ???? ?????????? ????????? ??????? ????? ??? ?????? ? ?? ???? ??????? ??? "??????? ???" ??????? ??????? ???? ????.

?????

????? ???? ????? ????:
<%
   'Store information in a session variable.
   Session("myInformation") = "somevalue"
%>
				
??????? ?????? ?? ????? ????:
<%
    'Retrieve the information stored in the session variable.
    myValue = Session("myInformation")
%>
				

????? ????? ????????

??? ???? ???? ?

???? ????? ?? ????? ????? ????????: ????? ????? ???????? ?? ??????? ?????? ????? ???????? ???? ?? ??????? ??? ????? ??????. ?? ??? ????? ?????? ?? ??????? ???? ?? ???? ?? ????? ????? - ?????? ???? ??? ??????? ?? ??????? ?? ???????? ??? ??? ????? ????????. ??? ????? ?????? ???? ??? ??????? ??? ????? ?? ??? ??? ????????? ?????? ???? ????? ??? ??? ????? - ??????.

???? ????? ????? ????? ???????? ?????? ????????? ?? ????????? ???????? ?? ?? "??????" ? "?? ???? ??????.

?????????

  • ?? ????? ????? ??? ???????.
  • ???? ??? ??? ??????? ??? ????? ????????? ?? ???????? (????? ??? ??? ????? ????????) ?????? ????? ?????? ???????? ?????? ??? ??? ????? ????????. ???? ??? ????? ??? ????? ??? ????????.

cons

  • ????? ?????? ????? ????? ???????? ???? ?? ??????? ?????? ??? ?????.
  • ????? ??? ??????? ?? ????? ????? ????? ????? ???????? ???? ?? ??????? ?? ?????? ???.
  • ?? ???? ????? ????? ????? ???????? ????????.

?????

????? ????????? ?? ??? ????? ??????:
<%
   'Set a cookie value.
   Response.Cookies("myInformation") = "somevalue"
   'Expire the cookie to save it to disk. If this is omitted, the cookie
   'will be an in-memory cookie. In this case, the cookie is set to expire
   'in twenty days.
   Response.Cookies("myInformation").Expires = now() + 20
%>
				
??????? ?????? ?? ??? ????? ??????:
<%
    'Retrieve the information that is stored.
    myValue = Request.Cookies("myInformation")
%>
				

???? ??????? ???????

??? ???? ???? ?

????? ?? ???? ????? ????? ??? ???? ??????? ??????? ???? ????? ??? ??????? ??????. ????? ?? ??? ?? ????? ????? ??? ????? ??? ????? ??????? ??? ???? ?????????? ???????? ??????? ?????? ??? ???? ??????.

?????????

  • ?? ????? ??? ??????? ????? ????? ????????.

cons

  • ???? ?? ???? cumbersome ?????? ????? ???????? ??? ?????.
  • ?? ???? ????? ??? ??????? ????????.

?????

????? ????????? ?? ?????? ???????:
<HTML>
<HEAD>
<SCRIPT LANGUAGE=javascript>
  //Function that is used to submit the links:
  function browseToUrl(url){
    form1.action=url;
    form1.submit();
  }
</SCRIPT>
</HEAD>
<BODY>

<%
  dim myInformation
  myInformation = "somevalue"  
%>

<!-- This stores the value that is set above in the hidden form field. -->
<FORM id="form1" name="form1" action="" method="post">
<INPUT type="hidden" id="myInformation" name="myInformation" value="<%= myInformation%>">  

<!-- Navigation sample that uses this technique. -->
<INPUT type="button" value="p3.asp" id=button1 name=button1 onclick='goToUrl("p3.asp");'>
</FORM>
</BODY>
</HTML>
				
??????? ?????? ?? ??? ??????? ??????:
<%
    'Retrieving the information that is stored.
    myValue = Request.Form("myInformation")
%>
				

QueryString

??? ???? ???? ?

??? ??????? ?????? QueryString ??? ????? ????????? ?? URL ??? ??? - ????. ??? ???? ??????:
http://servername/page.asp?var1=value1&var2=value2&var3=value3
				
??????: ???? ?????? ????? ??? - ???? ????? ?? (&).

?????????

  • ??? ??? ?????? bookmarks ?????? ? ??? ????? ??????.

cons

  • ????? ??? ?? URL ?????? ???? 2083.
  • ?? ???? ????? ??? ??????? ????????.
  • URL ???? ???? ? ?????? ??????.

?????

????? ????????? ?? QueryString:
<HTML>
<HEAD></HEAD>
<BODY>
<%
   'Function that assembles the QueryString:
   function AddToQueryString(qs, name, value)
     
     if qs="" then
       qs = name & "=" & value
     else
       qs = qs & "&" & name & "=" & value
     end if
     
     addToQueryString = qs
   end function

   dim querystring

   'Store the first value.
   querystring = AddToQueryString(querystring, "firstvar", "firstvalue")
   'Store the second value.
   querystring = AddToQueryString(querystring, "secondvar", "secondvalue")
%>

<a href="urlreceive.asp?<%=querystring%>">urlreceive.asp</a>
</BODY>
</HTML>
				
??????? ????? ?? QueryString:
<%
    'Retrieve the information stored.
    myFirstValue = Request.QueryString("firstvar")
    mySecondValue = Request.QueryString("secondvar")
%>
				

??? ??????

??? ???? ???? ?

???? ????? ??? ??????? ???? ??? ??????. ???? ??????? ??????? ???? ??? ????? ????? ? ????? ????? ???????? ?? ????:
  1. ????? ???? ????? ???? ???????? ????? ?? browses ??? ???? ???? ??????? ????? ??.
  2. ??????? ?? ?? ???????? ?? ??? ??????? ?????? ?? ????.
  3. ?????? ????? ?? ??? ??????? ??????? ???? ???. ?????? ????? ?? ????? ?????? ??????? ?????? ?? ??????? ? ??? ??? - ???? ?????? ?????.
  4. ???? ??????? ????? ???? ???? ?? ??? ????? - ?????? ?? ????? ????????. ??????? ???????? ????? ??????? ?????? ?????? ?? ???????? ???????.
  5. ????? ???? ?????? ????? (??? ??????? ????????) ??? ????? ????? ????? (??? ???? ??????? ?? 20 ????? ?? ?? ????? ???????? ??? ????? ?????? ?? ?????????? ?? ?????? ??? ??????). ???? ?????? ???????? ?????? ?????? ?????? ?? ??? ??? ??? ????? ??? ????????.

?????????

  • ????? ????? ???? ???? ?? ????????.
  • ??? ??? ?????? ?????? ??? ?? ????? ?????? ???? ???????? ??????? ??????? ???? ????? ??? "??????? ???".
  • ?? ????? ????? ????? ????????.

cons

  • ???? ???? ???????? ??? ??????.
  • ???? ?? ???? cumbersome ??????.
  • ???? ?? ???? ??? ??????? ????? ??? ????? ???????? ??????? ??? ????? ?????? ????? ??????????.

?????

????? ?? ?????????? ???? ???????? ??????? ??? ???? ????? Microsoft (MSDN):
???? ???? ???
http://msdn2.microsoft.com/en-us/library/aa371675.aspx

???? ???????
http://msdn2.microsoft.com/en-us/library/aa210897(office.11).aspx

????? ????? ????????
Response.Cookies Collection
Request.Cookies Collection

QueryString
http://msdn2.microsoft.com/en-us/library/aa196462(office.11).aspx
?????? ??? ??????? ??????? ???? ??? ???? ????????? ????????? ??????? ?? "????? ??????? ?? Microsoft:
244465????? ????? ???? ???? ????? ASP ?? ????? ?????? ??????
178037PRB: ????? ???? ??????? ????? ??? ASP ?? ?????? ??????
?????? "????? ???????" ???? ???? ??? ?? ??????? ????? ??? InterDev Visual "?" ????? ?????? ?????? ? ???? ???? ??????? ??? ???? "????? ????? ?? Microsoft:
http://support.microsoft.com/search/default.aspx?qu=vinterdev

???????

???? ???????: 175167 - ????? ??? ??????: 19/???/1428 - ??????: 3.1
????? ???
  • Microsoft Active Server Pages 4.0
????? ??????: 
kbmt kbaspobj kbcodesnippet kbhowto kbscript KB175167 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????175167
????? ??????? ?? ????? ???? ?? ????? ???????
?? ????? ????? ?????? ???? ???? ???? ??? ??????? ??? ?? ? ?? ??? ??????? Microsoft ??? ????? ??? ??????? ????? ?????? ?????

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com