Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading sent string using POST method in ASP

Status
Not open for further replies.

gangar

Programmer
Apr 17, 2008
7
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.
 
The full HTTP Request header is not nicely exposed to ASP.

Microsoft parses out the stuff they think you need and removes stuff like permissions/credentials. This is exposed in a the Request object:
If you need a deeper examination of the Request then you might be able to get at it using the Request.BinaryRead method.

For an example of using Request.BinaryRead in ASP to parse the Request and extract an uploaded file:
 
Thanks Sheco. Request.BinaryRead method helped. I am able to see whatever string POSTed from my C++ code when added Response.BinaryWrite(Request.BinaryRead(a)) line to my ASP.
That confirms that ActiveX control successfully posing the data.
Can you help me how to parse this banary to read actual string.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top