Solved

POST data with CHtmlView and read from an ASP script

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Add content to output file 4 58
sumNumber challenge 16 99
move a line in eclipse 3 60
unix example issues 18 49
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

744 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now