开发者

Input type="file" server side access

I have the following client sid开发者_Python百科e code:

<form action="PhotoStore.aspx" id="form1" method="post" enctype="multipart/form-data">
<div>
    <input type="file" id="file"/>
    <input type="submit" />
</div>
</form>

With this client side code, how will I access the uploaded file in Photostore.aspx? Request.Files is having a count = 0 :( .? Whats going wrong?


You need to put a name on the input field, or it won't be included in the form data:

<input type="file" name="file"/>


What about

Page.Request.Form["file"]
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜