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
Solved

POST data with CHtmlView and read from an ASP script

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

Suggested Solutions

Title # Comments Views Activity
Process filename extension 3 194
difference between String.subString() and String.subSequence() 6 234
Problem to App 4 97
Problem to App source 6 70
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 …
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

839 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