asp.net mvc 3 - Request.Form[] return's null -
i used file controller , allow user upload file name
@using (html.beginform("attachfile", "coursework", new { enctype = "multipart/form-data" }, formmethod.post)) { @html.hiddenfor(model => model.prtfmaster.iconfilename, new { @id = "filename" }) <input type="file" name="file" id="file1"/>} on controller write this:
public actionresult uploadprtfassgmnt(formcollection form,httppostedfilebase file,coursework cwork) with i'm able fetch uploaded file name inside function if try value this:
string filename = request.form["filename"]; it returning null.
can me this? please
Comments
Post a Comment