file is saved with zero bytes(0 bytes)
<p>0 bytes file created when i am trying to replace the file in code behind of C#.</p>

<pre><code>  string FileExactLocation = s + str;
  if (File.Exists(FileExactLocation))
  {
      File.Replace(FileExactLocation, FileExactLocation,"werwe");
  }   
  else
      FileUpload1.SaveAs(FileExactLocation);
</code></pre>

<p>in above code, i am trying to delete a file located on server,it gets deleted but the file which i am trying to save (replace) contains 0 bytes...its empty...</p>

<p>Please give me the solution to this problem....</p>
