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

Discussion in 'ASP .Net' started by Li Zhang, May 20, 2005.

  1. Li Zhang

    Li Zhang Guest

    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!
     
    Li Zhang, May 20, 2005
    #1
    1. Advertising

  2. Li Zhang

    Guest

    Re: How to retrieve form field value if form is EncType=multipart/form-data Form?

    in the module you can use context.Request.Form

    This contains the form values (and the hidden values)
     
    , May 20, 2005
    #2
    1. Advertising

  3. Li Zhang

    Li Zhang Guest

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

    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!

    wrote:
    > in the module you can use context.Request.Form
    >
    > This contains the form values (and the hidden values)
    >
     
    Li Zhang, May 20, 2005
    #3
  4. Li Zhang

    Li Zhang Guest

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

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

    wrote:
    > in the module you can use context.Request.Form
    >
    > This contains the form values (and the hidden values)
    >
     
    Li Zhang, May 20, 2005
    #4
  5. Li Zhang

    softip

    Joined:
    Feb 27, 2009
    Messages:
    1
    use:
    form.texts.item("formfield")
     
    softip, Feb 27, 2009
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt
    Replies:
    8
    Views:
    142,558
    zeeshanakhter2009
    May 26, 2012
  2. Duncan
    Replies:
    0
    Views:
    1,468
    Duncan
    Feb 24, 2006
  3. Matt
    Replies:
    1
    Views:
    11,196
    David Dorward
    Oct 12, 2004
  4. Stimp
    Replies:
    1
    Views:
    895
    Karl Seguin [MVP]
    Nov 9, 2006
  5. David Lozzi

    Using <form ... enctype="multipart/form-data">

    David Lozzi, Aug 12, 2003, in forum: ASP General
    Replies:
    5
    Views:
    330
    Martin CLAVREUIL
    Aug 12, 2003
Loading...

Share This Page