I want to use opening Pdf file, and User input some of fields, and then save as this file into Specific folder in my Asp.net folder.
I try to use HttpPostedFileBase file but I cannot save this file to folder, always become null for Parameter.
Is it working right?
You guys have any other idea for open Pdf and edit, save as pdf file to folder?
<form method="post" enctype="multipart/form-data">
<div>
<embed name="file" src="~/AnnounceFile/PDF.pdf"
style="width: 780px; height:980px;"
class="with-200" />
<button type="submit">Import</button>
</div>
</form>
MY Controller.
[HttpPost]
public ActionResult Index(HttpPostedFileBase file)
{
string filename = Guid.NewGuid() + Path.GetExtension(file.FileName);
string filepath = "/folder/" + filename;
file.SaveAs(Path.Combine(Server.MapPath("/excelfolder"), filename));
InsertExceldata(filepath, filename);
return View(db.Iteminfoes.ToList());
}