Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

POST data with CHtmlView and read from an ASP script

Posted on 2001-08-05
3
Medium Priority
?
530 Views
Last Modified: 2013-11-20
Hi,
I'm facing difficulties in submitting data to an ASP script using POST method with CHtmlView Navigate method. The ASP script can not seem to read the values. Can anyone help?
thanks
0
Comment
Question by:nitshv
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 9

Expert Comment

by:ShaunWilde
ID: 6355577
what does your asp code and MFC code look like ?
0
 
LVL 49

Accepted Solution

by:
DanRollins earned 800 total points
ID: 6357279
I hit this problem and came away from an important client's phone call with a red face.  I had forgotten to indicate the post Content-type.  I had to add the Content-type line to my headers:

m_sMyHeaders.Format(
   "Accept: text/*\r\n"
   "Content-Type: application/x-www-form-urlencoded\r\n"
   "User-Agent: MYPROG %s\r\n",
  (LPCSTR) CSTR_AppVer
);

....

int nLen= m_sFormData.GetLength();
pFile->SendRequest(
    m_sMyHeaders, (LPVOID)(LPCTSTR)m_sFormData, nLen
);

=-=-=-=-=-=-=-
That could the the problem, but only if everything else about the request is correct.

-- Dan
0
 

Author Comment

by:nitshv
ID: 6366232
Thanks Dan, that was exactly wut was missing.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question