title: Accessing control from a master page asp.net - storing the value
body: <p>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?</p>
  
  <p>I don't think I can use the <strong>session</strong>, 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.</p>
  
  <p>I don't think I can use the <strong>viewstate</strong> since, although it solves my multiple tabs problem, the master page and content page have a different view state.</p>
  
  <p>At the moment I am using a public <strong>static</strong> 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.</p>
  
  <p><strong>Question:</strong>
  Can any one help me by suggesting which technology should I use?</p>
  
  <p>I have also heard about the 'Application' object but I don't think it makes sense to use it.</p>
  
  <p><strong>Current working Code:</strong></p>
  
  <p>(content page)</p>
  
  <pre><code>public static string Child
      {
          get
          {
              if (child == null)
                  return "-1";
              return child;
          }
  
          set
          {
              child = value;
          }
      }
  </code></pre>
  
  <p>(master page)</p>
  
  <pre><code>protected void ddlChooseChild_IndexChanged(object sender, EventArgs e)
          {
              ContentPage.Child = ddlChooseChild.SelectedValue;
          }
  </code></pre>