ASP Application Object
ရည်ရွယ်ချက်အချို့ကိုလုပ်ဆောင်ရန် ASP ဖိုင်အုပ်စုတစ်စုကို အပလီကေးရှင်းတစ်ခုဟုခေါ်သည်။ ဤဖိုင်များကို ချိတ်ဆက်ရန် Application object ကို အသုံးပြုပါသည်။
Application Object
ဝဘ်ပေါ်ရှိ အပလီကေးရှင်းတစ်ခုတွင် ရည်ရွယ်ချက်အချို့ကို လုပ်ဆောင်ရန် အတူတကွလုပ်ဆောင်သည့် ASP ဖိုင်အများအပြား ပါဝင်နိုင်သည်။ ဤဖိုင်များကို ချိတ်ဆက်ရန် Application object ကို အသုံးပြုပါသည်။
အပလီကေးရှင်းအရာဝတ္တုကို Session အရာဝတ္ထုကဲ့သို့ပင် မည်သည့်စာမျက်နှာမှ ကိန်းရှင်များကို သိမ်းဆည်းရန်နှင့် ဝင်ရောက်ကြည့်ရှုရန် အသုံးပြုသည်။ ကွာခြားချက်မှာ အသုံးပြုသူတိုင်းသည် ONE Application object (Sessions တွင် အသုံးပြုသူတိုင်းအတွက် ONE Session object ရှိသည်)။
အပလီကေးရှင်းအရာဝတ္တုသည် အပလီကေးရှင်းရှိ စာမျက်နှာများစွာမှ အသုံးပြုမည့် အချက်အလက် (ဒေတာဘေ့စ်ချိတ်ဆက်မှုအချက်အလက်ကဲ့သို့) သိမ်းဆည်းထားသည်။ အချက်အလက်များကို မည်သည့်စာမျက်နှာမှ ဝင်ရောက်ကြည့်ရှုနိုင်ပါသည်။ အချက်အလက်များကိုလည်း တစ်နေရာတည်းတွင် ပြောင်းလဲနိုင်ပြီး ပြောင်းလဲမှုများကို စာမျက်နှာအားလုံးတွင် အလိုအလျောက် ရောင်ပြန်ဟပ်မည်ဖြစ်သည်။
Application object ၏ စုစည်းမှု၊ နည်းလမ်းများနှင့် အဖြစ်အပျက်များကို အောက်တွင်ဖော်ပြထားသည်-
စုစည်းမှုများ
Collection | Description |
---|---|
Contents | Contains all the items appended to the application through a script command |
StaticObjects | Contains all the objects appended to the application with the HTML <object> tag |
နည်းလမ်းများ
Method | Description |
---|---|
Contents.Remove | Deletes an item from the Contents collection |
Contents.RemoveAll() | Deletes all items from the Contents collection |
Lock | Prevents other users from modifying the variables in the Application object |
Unlock | Enables other users to modify the variables in the Application object (after it has been locked using the Lock method) |
အဲ့ဒါနဲ့
Event | Description |
---|---|
Application_OnEnd | Occurs when all user sessions are over, and the application ends |
Application_OnStart | Occurs before the first new session is created (when the Application object is first referenced) |