title: Dynamic C# object to session variable?
body: <p>I'm having trouble understanding how I should go about adding a dynamic object to a session variable. EDIT: I don't think I explained myself well enough. Let me try again.</p>
  
  <pre><code>Example:
  Object1
  Property1 = Value1
  Property2 = Value2
  Property3 = Value3
  (All of which are generated dynamically from the database.)
  
  object obj = new object();
  obj.add(property = value) // Not sure of syntax, but I'd be looping this to add stuff.
  // Then when it's done looping...
  HttpContext.Current.Session[Object1] = obj;
  </code></pre>