title: How to upload and save file in database using mvc3
body: <p>Here is my code for upload a file. It upload the file and save into upload folder. Now want to save the file name in the database. what can i do to save the file name in database.</p>
  
  <pre><code>public ActionResult FileUpload(upload mRegister)
      {
          //Check server side validation using data annotation
          if (ModelState.IsValid)
          {
              //TO:DO
              var fileName = Path.GetFileName(mRegister.file.FileName);
              var path = Path.Combine(Server.MapPath("~/Content/Upload"), fileName);
              mRegister.file.SaveAs(path);
              ViewBag.Message = "File has been uploaded successfully";
              ModelState.Clear();
          }
          return View();
      }
  </code></pre>