title: Object reference not set to an instance of an object
body: <p>In this line of code   </p>
  
  <pre><code>  &lt;% var tmp = int.Parse(ViewData["numOfGroups"].ToString()); %&gt;
  </code></pre>
  
  <p>I have error:<code>Object reference not set to an instance of an object</code>.   How correctly convert</p>
  
  <p><code>ViewData["numOfGroups"]</code> to <code>int</code>?</p>