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

  • Home
  • SEARCH
  • 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 7724285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T04:39:00+00:00 2026-06-01T04:39:00+00:00

this is my first time posting on StackOverflow but this site is awesome. Thanks

  • 0

this is my first time posting on StackOverflow but this site is awesome. Thanks in advance for any help you’re able to give.

I have a site which gives users access to different pages based on their permissions so each user needs to have their menu dynamically generated when they log in. However, a user’s options probably won’t be changing very often.

The site currently has a Master page which pulls a list of their pages from the database and builds a menu. It does this each time the user loads a page.

I wanted to cut down on calls to the database so started putting the menu data into a Session variable. I was hoping someone more experienced could help me out in making sure that this is the best way to do it. I think I would prefer a way to store it on the user’s machine and not the server.

I have this is my Master’s Page Load:

User u = new User(Page.User.Identity.Name, Globals.getCnString());
        DataTable menu;
        if(Session["MENU"] == null)
        {
            Session["MENU"] = u.getMenu();
        }
        menu = (DataTable)Session["MENU"];

        foreach (DataRow r in menu.Rows)
        {
           //build menu code here.
        }

Thanks again!

  • 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-06-01T04:39:01+00:00Added an answer on June 1, 2026 at 4:39 am

    If user’s options won’t be changing very often, why don’t you build the menu only when the change happened, save it in user’s profile table (in html format), and pass it to a literal control in the Master page instead of the menu, in that way you’ll not store it on the user’s machine(which is not recommended for a website).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my first time posting to stackoverflow, but these threads have helped me
This is my first time posting on Stackoverflow, but I've been reading through many
first time posting here, but god know's I use this site to search for
this is my first time posting here, I have a question which I have
use this website a lot but first time posting. My program creates a number
This is the first time I am posting a question on stackoverflow, so please
this is my first time posting on here and have read alot of helpful
Hey guys, this is my first time actually posting at stackflow but i've used
this is my first time posting here, but I didn't know where else to
This is my first time posting -- I found similar issues but not anything

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.