ASP.NET to ASP help converting bytes (xml adf format) to string

Discussion in 'ASP General' started by Girish, Feb 15, 2004.

  1. Girish

    Girish Guest

    HERE IS SOME ASP.NET CODE NEED HELP on transfering this to classic ASP, all
    I need is valid XML doc so that I can read data from it and display it on
    the browser

    // Make sure we have something to work with

    int bLen = Context.Request.ContentLength;

    if( bLen > 0 )



    XML formatted as ADF(auto lead data)... so convert the bytes to string.

    byte[] bytes = Context.Request.BinaryRead( bLen );

    string msg = Encoding. ( bytes, 0, bLen );



    // At this point we have some data and we expect

    // it to be an ADF report, which is valid XML.
     
    Girish, Feb 15, 2004
    #1
    1. Advertisements

  2. Girish

    Bob Barrows Guest

    Girish wrote:
    > HERE IS SOME ASP.NET CODE NEED HELP on transfering this to classic
    > ASP, all I need is valid XML doc so that I can read data from it and
    > display it on the browser
    >
    > // Make sure we have something to work with
    >
    > int bLen = Context.Request.ContentLength;
    >
    > if( bLen > 0 )
    >
    >
    >
    > XML formatted as ADF(auto lead data)... so convert the bytes to
    > string.
    >
    > byte[] bytes = Context.Request.BinaryRead( bLen );
    >
    > string msg = Encoding. ( bytes, 0, bLen );
    >
    >
    >
    > // At this point we have some data and we expect
    >
    > // it to be an ADF report, which is valid XML.



    I haven't a clue what an ADF report is, but I can tell you that XML is XML
    in any language. So, whatever the XML looks like in your .Net application,
    you should create the same XML in the ASP app.

    Bob Barrows

    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
     
    Bob Barrows, Feb 16, 2004
    #2
    1. Advertisements

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 Candy
    Replies:
    2
    Views:
    1,448
    Janaka
    Feb 18, 2004
  2. Andy
    Replies:
    7
    Views:
    6,621
    Roedy Green
    May 10, 2004
  3. Replies:
    8
    Views:
    1,999
    Ian Vincent
    Dec 17, 2004
  4. ramakrishna

    Converting from bytes to String

    ramakrishna, Sep 27, 2006, in forum: Java
    Replies:
    1
    Views:
    764
    Dan Andrews
    Sep 27, 2006
  5. BogusException
    Replies:
    7
    Views:
    532
  6. Girish
    Replies:
    0
    Views:
    726
    Girish
    Feb 13, 2004
  7. Erinys
    Replies:
    1
    Views:
    185
    Grant Wagner
    Nov 16, 2004
  8. Chris Angelico
    Replies:
    3
    Views:
    404
    Mark Lawrence
    Mar 1, 2013
Loading...