Solved

POST data with CHtmlView and read from an ASP script

Posted on 2001-08-05
3
488 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
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 200 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Turn a spreadsheet into a vba executable. 2 85
has77  challenge 9 82
Execute multiple curl cmds with sleep and send output to file 10 97
x-bar in Google Sheets 2 52
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
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.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

776 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