title: Programmatically change the page redirection in web config
body: <p>Hi i want to change the Page redirection in webconfig programmatically.
  i have following code in web config.</p>
  
  <pre><code>&lt;location path="WebForm2.aspx"&gt;
      &lt;system.webServer&gt;
        &lt;httpRedirect enabled="true" destination="http://google.com" httpResponseStatus="Permanent" /&gt;
      &lt;/system.webServer&gt;
    &lt;/location&gt;
  </code></pre>
  
  <p>i want to enable or disable the httpredirect programmatically using c#.
  please suggest me how to do this.</p>