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

Re: Request.BinaryRead()! by Phill

Phill
Thu Aug 25 06:27:21 CDT 2005

"Arpan" <arpan_de@hotmail.com> wrote in message
news:1124955035.258806.120750@g44g2000cwa.googlegroups.com...
> 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.