Files Transmitted Via Response.BinaryWrite()

Discussion in 'ASP .Net' started by A_StClaire_, Jun 1, 2006.

  1. A_StClaire_

    A_StClaire_ Guest

    hi,

    I'm using an .aspx page to distribute files via the following code.
    items in caps are constants.


    Response.ContentType = RESPONSE_CONTENT_TYPE;
    Response.AddHeader(RESPONSE_HEADER_NAME, RESPONSE_HEADER_VALUE_PREFIX +
    sTargetFilename);
    Response.BinaryWrite(abBytesToWrite);


    my question is, is using a System.Net.WebClient object the only way of
    retrieving the file in a C# application? reason I'm asking is I'd love
    to get the file without using a query string.

    is there another .NET class that can do that?

    thx a bunch
     
    A_StClaire_, Jun 1, 2006
    #1
    1. Advertisements

  2. You can get the file using an HttpWebRequest object.

    If you by query string mean the url, it can't be done. There is no way
    that you can send a request without an url.
     
    =?ISO-8859-1?Q?G=F6ran_Andersson?=, Jun 1, 2006
    #2
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.