ASP ကျူတိုရီရယ်များ

ASP ပင်မစာမျက်နှာ

WP ကျူတိုရီရယ်

ဝဘ်စာမျက်နှာများ နိဒါန်း ဝဘ်စာမျက်နှာများ သင်တုန်းဓား ဝဘ်စာမျက်နှာများ အပြင်အဆင် ဝဘ်စာမျက်နှာများ ဖိုဒါများ WebPages Global ဝဘ်စာမျက်နှာများ ပုံစံများ ဝဘ်စာမျက်နှာများ အရာဝတ္ထုများ WebPages ဖိုင်များ ဝဘ်စာမျက်နှာများ ဒေတာဘေ့စ်များ ဝဘ်စာမျက်နှာများ အကူအညီပေးသူများ ဝဘ်စာမျက်နှာများ WebGrid ဝဘ်စာမျက်နှာများ ဇယားများ ဝဘ်စာမျက်နှာများ အီးမေးလ် ဝဘ်စာမျက်နှာများ လုံခြုံရေး ဝဘ်စာမျက်နှာများ ထုတ်ဝေခြင်း။ ဝဘ်စာမျက်နှာများ ဥပမာများ WebPages အတန်းများ

ASP.NET Razor

သင်တုန်းမိတ်ဆက် Razor Syntax Razor C# Variables Razor C# ကွင်း သင်တုန်း C# ယုတ္တိဗေဒ Razor VB Variables Razor VB Loops Razor VB Logic

ASP Classic

ASP မိတ်ဆက် ASP Syntax ASP Variables ASP လုပ်ထုံးလုပ်နည်းများ ASP အခြေအနေများ ASP Looping ASP ပုံစံများ ASP Cookies ASP Session ASP လျှောက်လွှာ ASP #ပါဝင်ပါသည်။ ASP Global.asa ASP AJAX ASP အီးမေးလ် ASP ဥပမာများ

ASP အကိုးအကား

ASP VB လုပ်ဆောင်ချက်များ ASP VB သော့ချက်စာလုံးများ ASP တုံ့ပြန်မှု ASP တောင်းဆိုချက် ASP လျှောက်လွှာ ASP Session ASP ဆာဗာ ASP အမှား ASP ဖိုင်စနစ် ASP TextStream ASP Drive ASP ဖိုင် ASP Folder ASP အဘိဓာန် ASP AdRotator ASP BrowserCap ASP အကြောင်းအရာ ချိတ်ဆက်ခြင်း။ ASP အကြောင်းအရာ Rotator ASP အမြန် Ref

ADO ကျူတိုရီရယ်

ADO မိတ်ဆက် ADO ချိတ်ဆက်မှု ADO မှတ်တမ်းအစုံ ADO ရုပ်ထွက် ADO မေးခွန်း ADO အမျိုးအစား ADO ထည့်ပါ။ ADO အပ်ဒိတ် ADO ဖျက်ပါ။ ADO ဒီမို ADO အရှိန်မြှင့်ပါ။

ADO အရာဝတ္ထုများ

ADO Command ADO ချိတ်ဆက်မှု ADO အမှား ADO Field ADO Parameter ADO အိမ်ခြံမြေ ADO မှတ်တမ်း ADO မှတ်တမ်းအစုံ ADO တိုက်ရိုက်ကြည့်ရှုခြင်း။ ADO ဒေတာအမျိုးအစားများ

ASP Cookies စုစည်းမှု


❮ ပြီးပြည့်စုံသော တုံ့ပြန်မှု Object ရည်ညွှန်းချက်

Cookies စုစည်းမှုကို ကွက်ကီးတန်ဖိုးများ သတ်မှတ်ရန် သို့မဟုတ် ရယူရန် အသုံးပြုပါသည်။ cookie မရှိပါက၊ ၎င်းကိုဖန်တီးမည်ဖြစ်ပြီး သတ်မှတ်ထားသောတန်ဖိုးကိုယူပါ။

မှတ်ချက်- Response.Cookies command သည် <html> tag ရှေ့တွင် ပေါ်လာရပါမည်။

အထားအသို

Response.Cookies(name)[(key)|.attribute]=value

variablename=Request.Cookies(name)[(key)|.attribute]

Parameter Description
name Required. The name of the cookie
value Required for the Response.Cookies command. The value of the cookie
attribute Optional. Specifies information about the cookie. Can be one of the following parameters: 
  • Domain -  Write-only. The cookie is sent only to requests to this domain
  • Expires - Write-only. The date when the cookie expires. If no date is specified, the cookie will expire when the session ends
  • HasKeys - Read-only. Specifies whether the cookie has keys (This is the only attribute that can be used with the Request.Cookies command)
  • Path - Write-only. If set, the cookie is sent only to requests to this path. If not set, the application path is used
  • Secure - Write-only. Indicates if the cookie is secure
key Optional. Specifies the key to where the value is assigned

ဥပမာများ

"Response.Cookies" အမိန့်ကို ကွက်ကီးဖန်တီးရန် သို့မဟုတ် ကွက်ကီးတန်ဖိုး သတ်မှတ်ရန် အသုံးပြုသည်-

<%
Response.Cookies("firstname")="Alex"
%>

အထက်ဖော်ပြပါ ကုဒ်တွင် ကျွန်ုပ်တို့သည် "firstname" ဟု အမည်ပေးထားသော ကွတ်ကီးတစ်ခုကို ဖန်တီးပြီး တန်ဖိုး "Alex" ကို ၎င်းတွင် သတ်မှတ်ပေးထားပါသည်။

ကွတ်ကီးသက်တမ်းကုန်ဆုံးမည့်ရက်စွဲကို သတ်မှတ်ခြင်းကဲ့သို့ ကွတ်ကီးတစ်ခုသို့ ရည်ညွှန်းချက်အချို့ကို ပေးဆောင်ရန်လည်း ဖြစ်နိုင်သည်-

<%
Response.Cookies("firstname")="Alex" 
Response.Cookies("firstname").Expires=#May 10,2002#
%>

ယခု "firstname" ဟု အမည်ပေးထားသည့် ကွတ်ကီးသည် "Alex" ၏တန်ဖိုးရှိပြီး ၎င်းသည် အသုံးပြုသူ၏ကွန်ပျူတာမှ မေလ 10၊ 2002 တွင် သက်တမ်းကုန်ဆုံးမည်ဖြစ်သည်။

"Request.Cookies" ညွှန်ကြားချက်ကို cookie တန်ဖိုးတစ်ခုရရှိရန် အသုံးပြုပါသည်။

အောက်ဖော်ပြပါ ဥပမာတွင်၊ ကျွန်ုပ်တို့သည် cookie "firstname" ၏တန်ဖိုးကို ရယူပြီး စာမျက်နှာတစ်ခုပေါ်တွင် ပြသသည်-

<%
fname=Request.Cookies("firstname")
response.write("Firstname=" & fname)
%>

အထွက်-
Firstname=Alex

ကွက်ကီးတစ်ခုတွင် တန်ဖိုးများစွာ စုစည်းမှုလည်း ပါဝင်နိုင်သည်။ ကွတ်ကီးတွင် သော့များရှိသည်ဟု ကျွန်ုပ်တို့ပြောကြသည်။

အောက်ဖော်ပြပါ ဥပမာတွင်၊ ကျွန်ုပ်တို့သည် "အသုံးပြုသူ" ဟု အမည်ပေးထားသော ကွတ်ကီးစုဆောင်းမှုကို ဖန်တီးပါမည်။ "အသုံးပြုသူ" ကွက်ကီးတွင် အသုံးပြုသူတစ်ဦးနှင့်ပတ်သက်သည့် အချက်အလက်ပါရှိသော သော့များပါရှိသည်-

<%
Response.Cookies("user")("firstname")="John"
Response.Cookies("user")("lastname")="Smith"
Response.Cookies("user")("country")="Norway"
Response.Cookies("user")("age")="25"
%>

အောက်ပါကုဒ်သည် သင့်ဆာဗာမှ သုံးစွဲသူတစ်ဦးထံ ပေးပို့ထားသော ကွတ်ကီးများအားလုံးကို ဖတ်သည်။ ကုဒ်သည် ကွတ်ကီးတစ်ခုတွင် HasKeys ပိုင်ဆိုင်မှုရှိ သော့များ ရှိမရှိ စစ်ဆေးသည်ကို သတိပြုပါ။

<html>
<body>

<%
dim x,y

for each x in Request.Cookies
  response.write("<p>")
  if Request.Cookies(x).HasKeys then
    for each y in Request.Cookies(x)
      response.write(x & ":" & y & "=" & Request.Cookies(x)(y))
      response.write("<br>")
    next
  else
    Response.Write(x & "=" & Request.Cookies(x) & "<br>")
  end if
  response.write "</p>"
next
%>

</body>
</html>
%>

အထွက်-

firstname=Alex

user:firstname=John
user:lastname=Smith
user:
country=Norway
user:
age=25


❮ ပြီးပြည့်စုံသော တုံ့ပြန်မှု Object ရည်ညွှန်းချက်