Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6918835
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:54:39+00:00 2026-05-27T09:54:39+00:00

I am a PHP developer and have been asked to make some amends to

  • 0

I am a PHP developer and have been asked to make some amends to an Asp.Net site. There is a hardcoded table on one page which contains event information (Date, venue etc). The page uses javascript to toggle table row colours based on whether the event has already happened.

I need to add a block on another page which displays 2 upcoming events based on the current date. What is the simplest way to store and share the event data between pages? There is no database available so it needs to be a local file or array etc.

I would appreciate some insight on any good libraries / techniques which would be appropriate. This is for a simple, low-traffic site.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T09:54:39+00:00Added an answer on May 27, 2026 at 9:54 am

    Create a small class that represents your Event, then you can store it in the Session state:

    public class EventInfo
    {
        //c# auto-implemented properties
        public string Bla {get; set;} 
        public int Bla2 {get; set;}
    }
    
    //set on one page
    var eventInfo = new EventInfo();
    eventInfo.Bla = "bla";
    eventInfo.Bla1 = 2;
    Sesssion["eventinfo"] = eventInfoObject;
    
    
    //get on another
    var eventInfo = (EventInfo)Session["eventinfo"]; //add null checks etc
    string bla = eventInfo.Bla;
    int Bla2 = eventInfo.Bla2;
    
    //************************************************//
    
    //set multiple events in Session  
    List<EventInfo> events = new List<EventInfo>();   
    events.Add(new EventInfo{ Bla= "bla", Bla1 = 2});
    events.Add(new EventInfo{ Bla= "bla2", Bla1 = 3});
    Sesssion["eventCollection"] = events ;
    
    //get 
    List<EventInfo> events = (List<EventInfo>)Session["eventCollection"]; //add null checks etc
    foreach(EventInfo event in Events)
    {
        string bla = event.Bla;
        int Bla2 = event.Bla2;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am not a PHP developer at heart and I have been asked to
I have been a long-term .NET developer, but dabble in Java and PHP development
I am a web-developer working in PHP. I have some limited experience with using
I am a web developer, have worked with PHP and .NET both. having over
I primarily come from a PHP background but I have been asked to develop
I've been working with a developer on a web-based application. I have some experience
So I'm a slightly seasoned php developer and have been 'doin the damn thing'
As a PHP developer, I have been using Xampp for running PHP and MySQL
I'm been a PHP developer for quite some time now but until today I've
Have any bridge libraries been developed for PHP that provide access to the jQuery

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.