title: access property of an instance property of class that inherits from Controller
body: <p>Why am I not able to assign value to the <code>myBrowser</code> variable if in a hybrid app (MVC + webforms, but predominantly webforms), I add in a class <code>Class1</code> this inner class</p>
  
  <pre><code>public class MyMvcController : System.Web.Mvc.Controller
  {
  
  }
  </code></pre>
  
  <p>and then in a method belonging to Class1 I try to reference it as follows
  <code>HttpBrowserCapabilitiesBase myBrowser = new MyMvcController().Request.Browser;</code>
  at which point myBrowser is null.
  PS: Request property is an instance property of Controller
  Syntactically what I've done is correct (no errors)</p>
  
  <p>I'm including the concrete example below:</p>
  
  <pre><code>public class Class1 : System.Web.UI.MasterPage
  {
          public class MyMvcController : System.Web.Mvc.Controller
          {
  
          }
  
          public string getBrowser()
          {
              return new MyMvcController().Request.Browser;
              //HttpBrowserCapabilitiesBase browser = new MyMvcController().Request.Browser;
          }
  
          protected override void OnInit(EventArgs e)
          {
              base.OnInit(e);
              string b = getBrowser();
          }
  }
  </code></pre>