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 7826049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T09:15:12+00:00 2026-06-02T09:15:12+00:00

At the moment I have a master page and a content page. My master

  • 0

At the moment I have a master page and a content page. My master page consists of a dropdownlist, from which I need to select a child from. The content page loads according the child chosen. How should I store the dropdownvalue chosen?

I don’t think I can use the session, since I would like the user to be able to open multiple tabs and watch different children contents at the same time. If I can use the session in this case, I’m not sure how.

I don’t think I can use the viewstate since, although it solves my multiple tabs problem, the master page and content page have a different view state.

At the moment I am using a public static variable on the content page, and I set it in the master page. But from what I’ve heard static variables have their values stored throughout ALL the current sessions on the site.

Question:
Can any one help me by suggesting which technology should I use?

I have also heard about the ‘Application’ object but I don’t think it makes sense to use it.

Current working Code:

(content page)

public static string Child
    {
        get
        {
            if (child == null)
                return "-1";
            return child;
        }

        set
        {
            child = value;
        }
    }

(master page)

protected void ddlChooseChild_IndexChanged(object sender, EventArgs e)
        {
            ContentPage.Child = ddlChooseChild.SelectedValue;
        }
  • 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-02T09:15:13+00:00Added an answer on June 2, 2026 at 9:15 am

    The best way to share data between different controls is to make use of the “Items” collection (which is a property of the HttpContext class). The collection is a Hashtable and can be accessed from your Page and User Controls like so:

    Context.Items["Child"] = ddlChooseChild.SelectedValue;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

At the moment to set a page title you have this on the Master
I have a master page which creates a ContentPlaceHolder for each page where my
At the moment I have a slider and an small input text box which
At the moment I have a jQuery do a POST to a Controller which
At the moment I have a combobox that is populated from the name fields
At the moment I have the following code which works fine. label = new
At the moment i have a stylesheet switcher which uses javascript to to load
I am writing an ASP.NET 4 application with C#. I have a Master Page,
I have a Masterpage (site.master) that calls a View using RenderAction. At the moment
Here's the setup: I have a page, we'll call it A, which contains a

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.