Directory.Move causes a postback in asp.net
<p>Under a button event inside an updatePanel, I would like to rename a folder:</p>

<pre><code>Directory.move(oldF, newF);
</code></pre>

<p>I checked the physical folders: the old folder is renamed with the new folder. However, it will cause a postback... </p>

<p>Step into: Stepping over non-user code </p>

<pre><code>'System.Web.UI.WebControls.Button.RaisePostBackEvent'
Step into: Stepping over non-user code 'System.Web.UI.Page.RaisePostBackEvent'
Step into: Stepping over non-user code 'System.Web.UI.Page.ProcessRequestMain'
</code></pre>

<p>If I remove that line then it does not.</p>

<p>Is this always a case with Directory.move? Or any other better way?</p>

<p>I also tried to use:</p>

<pre><code>System.IO.DirectoryInfo di = new System.IO.DirectoryInfo(oldF);
di.MoveTo(newF);
</code></pre>

<p>But then the folder is not renamed... </p>
