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"]
精彩评论