Resolves a method that request.getparameter () gets no value when the form's enctype= "Multipart/form-data"
Url:http://blog.csdn.net/georgejin/archive/2007/07/25/1706647.aspx
Today in the original upload file page on the basis of a file to add a
When you use a form to transfer data, if the form adds a enctype= "Multipart/form-data" attribute, the form request is passed to another JSP or servletIt is not possible to use Request.getparameter () to get the values of individual form
We all know that to allow form to submit files, you need to specify Enctype=multipart/form-data on the form, so that you can upload files, about enctype article a lot, no longer explain.
The problem is that the html.beginform () of MVC is used to
Enctype= ' Multipart/form-data 'HTML forms provide three methods of encoding.
Application/x-www-form-urlencoded (the default)
Multipart/form-data
Text/plain
upload a file in the form to add attributes enctype=
The first thing to know is that the Enctype property manages the MIME encoding of the form. A total of three values are optional:1, application/x-www-form-urlencoded2, Multipart/form-data3, Text/plainWhere application/x-www-form-urlencoded is the
When uploading files, we encountered a strange problem. IE6, 7, and 8 always failed to upload files, and the server could not receive files. We all knew that we wanted form to be able to submit files, you need to specify the attribute of enctype =
We all know that to allow the form to submit files, you must specify enctype = multipart/form-data attribute on the form to upload files. There are many articles about enctype, so we will not explain them any more.The problem is that the MVC Html.
We all know that to allow the form to submit files, you must specify enctype = multipart/form-data attribute on the form to upload files. There are many articles about enctype, so we will not explain them any more.
The problem is that the MVC
Enctype = "multipart/form-Data" is used to upload images in a form.
ArticleSource: http://hi.baidu.com/greengain/blog/item/e9c02855f564e6c0b645ae17.html
Enctype = "multipart/form-Data" is set in the form label to ensure that the uploaded files
Enctype = "multipart/form-Data" is used to upload images in a form.
Enctype = "multipart/form-Data" is set in the form label to ensure that the uploaded files are properly encoded. As follows: upload the Business License Image: , you must add
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.