Request.BinaryRead()!

Discussion in 'ASP General' started by Arpan, Aug 25, 2005.

  1. Arpan

    Arpan Guest

    Under what circumstances can Request.BinaryRead() be useful & when
    should it be used?

    Assume that the value of Request.Form("anyvalue") is "a" (without the
    quotes). The output of

    <%
    Response.Write(Request.BinaryRead(10))
    %>

    is "??a" (again, without the quotes). How does ASP compute this value?

    Thanks,

    Arpan
    Arpan, Aug 25, 2005
    #1
    1. Advertising

  2. Arpan

    Phill. W Guest

    "Arpan" <> wrote in message
    news:...
    > Under what circumstances can Request.BinaryRead() be useful
    > & when should it be used?


    Most commonly used for uploading files to the web server, as
    submitted by the <input type='file'> HTML form field.

    > Assume that the value of Request.Form("anyvalue") is "a"


    Without the use of a third-party component, you cannot mix using
    BinaryRead with using "ordinary" form fields; the use of one
    precludes the use of the other. Because of this, most components
    supply a surrogate Form collection.

    Unless, of course, you unpick the uploaded content and pull out in
    the individual form fields as well as the binary stuff.
    Fiddly, but possible.

    HTH,
    Phill W.
    Phill. W, Aug 25, 2005
    #2
    1. Advertising

  3. Arpan

    Bullschmidt Guest

    And there are some non-component ASP classes that use
    Request.BinaryRead() for file uploading and still allow access to
    regular form fields with a special syntax such as:

    ASP File Upload Using VBScript by John R. Lewis - 7/10/2000
    http://aspzone.com/articles/160.aspx

    Pure ASP File Upload by Jacob Gilley - Approx. 12/2000
    http://www.asp101.com/articles/jacob/scriptupload.asp

    Best regards,
    J. Paul Schmidt, Freelance ASP Web Developer
    http://www.Bullschmidt.com
    ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...

    <<
    Without the use of a third-party component, you cannot mix using
    BinaryRead with using "ordinary" form fields; the use of one
    precludes the use of the other. Because of this, most components
    supply a surrogate Form collection.

    Unless, of course, you unpick the uploaded content and pull out in
    the individual form fields as well as the binary stuff.
    Fiddly, but possible.
    >>


    *** Sent via Developersdex http://www.developersdex.com ***
    Bullschmidt, Aug 25, 2005
    #3
    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. Brian Birtle
    Replies:
    2
    Views:
    1,989
    John Saunders
    Oct 16, 2003
  2. Lau Lei Cheong

    Question about using Request.BinaryRead()

    Lau Lei Cheong, Aug 23, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    627
    bruce barker
    Aug 23, 2004
  3. Nikhil
    Replies:
    1
    Views:
    163
    GVaught
    Sep 11, 2003
  4. Roberto
    Replies:
    1
    Views:
    139
  5. Replies:
    0
    Views:
    328
Loading...

Share This Page