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

  • Thread starter Thread starter Li Zhang
  • Start date Start date
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!
 
in the module you can use context.Request.Form

This contains the form values (and the hidden values)
 
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!
 
I tried, you are right. I can access them by Request.Form. I made a
mistake. Sorry. Thanks for your reply. :)
 
Back
Top