I.T. Discussion Community!
-Collapse +Expand
Prism
Search Prism Group:

Advanced
-Collapse +Expand Prism To/From
To/FromCODEGuides
-Collapse +Expand Prism Study Test
PRESTWOODCERTIFIED
-Collapse +Expand Prism Store
PRESTWOODSTORE

Prestwood eMagazine

June Edition
Subscribe now! It's Free!
Enter your email:

   ► MB LobbyDelphi Prism BoardDelphi Prism Topic   Print This    All Groups  

Cache in Asp.Net pages

Cache in Asp.Net pages in Delphi Prism topic (part of our Delphi Prism group).

Quick Search: Cache Asp   Cache Asp Net  
Most Recent Post
Willemt
Purmerend, -- UNK

Hi,

I have created a asp.net website application using Delphi Prism. In that application I used Cache to open pages with the same data from a previous page.

When opening a next page I needed to check if the cache exists. I have used this peace of code and It's working You're invited to improve it or use it if you like it.

method Default1.Page_Load(sender: Object; e: EventArgs);
var
CacheText, CacheText2 : Object;
begin
    If Cache['Name'] <> nil then
     begin
        Tekst := (Cache.Get("Name"));
        // do something with existing Cache
     end
     else
     begin
        Page.Cache.Insert("Name",'errortext!!!!', nil,
                 DateTime.Now.AddMinutes(1), TimeSpan.Zero) ;
     end;
        CacheText2 := (Cache.Get("Name"));
        Label1.Text := CacheText2.ToString;
end;
 Posted 10 years ago (Thread Starter)
Comment Quote
About Willemt -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.

Post ID #13516, No Replies Be the first!
Thread Started 5/24/2009 6:17:05 AM
View Counter=4739
Location=Purmerend, -- UNK 
Joined=10 years ago   MB Posts=2  

Revive Thread!

Add a comment to revive this old thread and make this archived thread more useful.

Write a Comment...
Full Editor
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1194A1
Enter key:
Icon: A Post    Thread    Idea    Important!    Cool    Sad    No    Yes    Includes a Link...   
Thread #13516 Counter
4739
Since 5/24/2009
Follow PrestwoodBoards on: 


©1995-2019 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech