title: how to update session timeout in web.config file form C# code?
body: <p>I want to update session timeout from C# code  </p>
  
  <pre><code>&lt;system.web&gt;
      &lt;sessionState 
        mode="InProc" 
        cookieless="false" 
        timeout="20"/&gt;
  &lt;/system.web&gt;
  </code></pre>
  
  <p>I use <code>Session.Timeout=50</code> and that works fine but I want to change the value in Web.Config file.</p>
  
  <p>After completing action file should be update like </p>
  
  <pre><code>&lt;system.web&gt;
          &lt;sessionState 
            mode="InProc" 
            cookieless="false" 
            timeout="50"/&gt;
  &lt;/system.web&gt;
  </code></pre>