title: How to get a value for an asp.net session parameter from property of session object
body: <p>I have an asp.net parameter</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;asp:SessionParameter Name="id" Type="Int32" SessionField="MySessionObject" DefaultValue="0"/&gt;
  </code></pre>
  
  <p>I also have a session object <code>Session["MySessionObject]</code></p>
  
  <p>Session object is of type <code>Widget</code> which has <em>ID</em> and <em>Name</em> properties.</p>
  
  <p>Is there a way to assign the <em>ID</em> value from <em>MySessionOjbect</em> to the asp.net SessionParameter or do I have to create a separate session variable for the ID?</p>
  
  <p>Thanks in advance.</p>