Reading sent string using POST method in ASP - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Reading sent string using POST method in ASP

Hello,

I am VC++ programmer. I am novice to ASP. I am using CWebBrowser2(ActiveX control) to navigate some user-written ASP pages from my application. When I navigate from my CWebBrowser2 control, I am telling it to use POST transaction instead of GET transaction and sending some Post data string.

The problem is I don't know correct way how to read this data in ASP. I used Request method but no use. Offcourse, I am not sure 100% that my activeX control is really using POST method to send data correct way. Can somebody help me to read post data. Or is there a way to monitor IIS to see how the activex control sending the request ?
FYI: I am sending string : "MYInput=This is my input"

Thanks.

Comments

  • FlakesFlakes Posts: 642Member

    You can use Request("X") to get the values using either POST or GET method.

    Theoretically, the values submitted using GET is accessed using Request.QueryString("X")

    And for posted data, it is Request.Form("X").

    But using just Request("X"), you can access the value of X, either using POST or GET.

    If that doesn't work, show code.

  • gangargangar Posts: 7Member
    :
    : You can use Request("X") to get the values using either POST or GET
    : method.
    :
    : Theoretically, the values submitted using GET is accessed using
    : Request.QueryString("X")
    :
    : And for posted data, it is Request.Form("X").
    :
    : But using just Request("X"), you can access the value of X, either
    : using POST or GET.
    :
    : If that doesn't work, show code.
    :
    :
    The activeX control from C++ is posting data in binary. I am able to read the data in ASP using
    Response.BinaryWrite(Request.BinaryRead(Request.TotalBytes))

    Is there any easy way to read or convert it into string in my ASP?

    I tried Request.Form("X") and Request("X") but no help.
Sign In or Register to comment.