title: Why do I need to typecast Viewstate Variables in asp.net
body: <p>I am a beginner in asp.net and I have encountered these following statements</p>
  
  <p>Statement 1</p>
  
  <pre><code>ViewState["clicks"] = 5;
  </code></pre>
  
  <p>Statement 2</p>
  
  <pre><code>ViewState["clicks"] = (int)ViewState["clicks"] + 1;
  </code></pre>
  
  <p>My doubt is If I am able to directly assign int value...Why do I need to typecast when I am incrementing the value in viewstate variable?
  Thanks in advance.......</p>