Organizational Research By

Surprising Reserch Topic

Experts Most Trusted Topic


uploaded httppostedfile is null using -'c#,asp.net,asp.net-mvc'


uploaded httppostedfile is null  using -'c#,asp.net,asp.net-mvc'

On the View:

<% =Html.BeginForm("About", "Home", FormMethod.Post, new {enctype="multipart/form-data "})%>
  <input type="file" name="postedFile" />
  <input type="submit" name="upload" value="Upload" />
<% Html.EndForm(); %>


In the Controller, there's something like this:

[AcceptVerbs(HttpVerbs.Post)]
public ActionResult About(HttpPostedFile postedFile)
{
    //but postedFile is null
    View();
}


postedFile is null in About(). How do I upload the file?
    

asked Sep 7, 2015 by rajesh
0 votes
20 views



Related Hot Questions



Walkin Jobs Opening



Government Jobs Opening


...