How to retrieve form field value if form is EncType=multipart/form-dataForm?

L

Li Zhang

I know I can use controlName.Value to retrieve the form fields value if
I am in that page. But if I am out of the page, for example I am in a
HttpModule, I want to retrieve a hidden filed value, Is that possible?
if so how? Thanks!
 
G

garethdjames

in the module you can use context.Request.Form

This contains the form values (and the hidden values)
 
L

Li Zhang

Thanks for your reply. Since the form is used for uploading files, The
enctype already set to be multipart/form-data, I don't think we can use
request.form or request.params to access those fields.

Actually, I tried both, it won't work, so I am wondering is there any
way I could retrieve the value of those fields?

Thanks!
 
L

Li Zhang

I tried, you are right. I can access them by Request.Form. I made a
mistake. Sorry. Thanks for your reply. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,832
Latest member
GlennSmall

Latest Threads

Top