title: Get variable value from code behind and use in aspx page control
body: <p>I got a web user control where I have controls that needs to be fed with some data from variables or properties from the underlying page.</p>
  
  <pre><code>&lt;%@ Control Language="C#" AutoEventWireup="False" CodeFile="Header.ascx.cs" Inherits="Site.UserControls.Base.Header" %&gt;
  &lt;asp:Literal runat="server" Text='&lt;%# Testing %&gt;' id="ltrTesting" /&gt;
  </code></pre>
  
  <p>Codebehind</p>
  
  <pre><code>namespace Site.UserControls.Base
  {
      public partial class Header : UserControlBase
      {
          public string Testing = "hello world!";
  
          protected void Page_Load(object sender, EventArgs e)
          {
              //this.DataBind(); // Does not work
              //PageBase.DataBind(); // Does not work
              //base.DataBind(); // Does not work
              //Page.DataBind(); // Does not work
          }
      }
  }
  </code></pre>
  
  <p>I did read this topic, but it wont solve my problem, I assume it's because this is a user control and not a page. <a href="https://stackoverflow.com/questions/5548812/i-want-to-get-property-value-from-code-behind">I want to get property value from code behind</a></p>