title: mvc3 get full path using HttpPostedFileBase
body: <p>I have a browse button and I am saving it to the database.</p>
  
  <p>using mvc3</p>
  
  <p>view</p>
  
  <pre><code> @using (Html.BeginForm("Upload", "Upload", FormMethod.Post, new { enctype = multipart/form-data" }))
  {
  &lt;input type="file" name="file" /&gt;
  }
  </code></pre>
  
  <p>control</p>
  
  <pre><code>public ActionResult Upload(FormCollection collection HttpPostedFileBase file)
        string filefullpath = Path.GetFullPath(file.FileName);
  </code></pre>
  
  <p>the Path.GetFullPath returns just the file name and my code crushes cause it is expecting full file path.</p>
  
  <p>I tried testing by passing test full path C:\filename.jpg and it worked. so I am missing the full path to be passed to the function....</p>
  
  <p>How do I get the full path from the browse button that was selected by the user.</p>
  
  <p>Thanks,</p>