asp.net - Save state of file upload control in mvc -
i using asp.net mvc framework. , trying save state of controls after postback request. values of simple controls (textbox etc...) can request, how value of file-input control in controller side form. let form as
@using(@html.beginform("method","controller",new{enctype="multiple/form-data"})) { @html.textbox("name") <input type="file" name="f1" id="f1" /> }
and controller as
[httppost] public actionresult method() { viewbag.name=request["name"] //here have value of file-control i.e. path contained in it, store in viewbag }
how value (i.e. path of file) request. please help.
you cannot full original path file in browsers, , cannot set value of input type=file
in event.
Comments
Post a Comment