Getting response from aspx page
-
Hi, I am opening an aspx page using the following code.From that aspx page,i will return some value using Response.Write("hi"); function.I want to get this string.How to get it from the aspx page to VC++. CInternetSession objInetSession; char szURL[100]; CStdioFile* objStdFile; try { wsprintf(szURL,"%s","http://101.8.0.24/test/test.aspx"); objStdFile = objInetSession.OpenURL(szURL,1,INTERNET_FLAG_TRANSFER_ASCII ,NULL,0); } catch(CInternetException* exp) { exp->ReportError(MB_OK,0); } Thanks,
-
Hi, I am opening an aspx page using the following code.From that aspx page,i will return some value using Response.Write("hi"); function.I want to get this string.How to get it from the aspx page to VC++. CInternetSession objInetSession; char szURL[100]; CStdioFile* objStdFile; try { wsprintf(szURL,"%s","http://101.8.0.24/test/test.aspx"); objStdFile = objInetSession.OpenURL(szURL,1,INTERNET_FLAG_TRANSFER_ASCII ,NULL,0); } catch(CInternetException* exp) { exp->ReportError(MB_OK,0); } Thanks,
-
Hi, I am opening an aspx page using the following code.From that aspx page,i will return some value using Response.Write("hi"); function.I want to get this string.How to get it from the aspx page to VC++. CInternetSession objInetSession; char szURL[100]; CStdioFile* objStdFile; try { wsprintf(szURL,"%s","http://101.8.0.24/test/test.aspx"); objStdFile = objInetSession.OpenURL(szURL,1,INTERNET_FLAG_TRANSFER_ASCII ,NULL,0); } catch(CInternetException* exp) { exp->ReportError(MB_OK,0); } Thanks,
Hello, I use this code. It's only a little different and it should answer your Question.
CInternetSession objInetSession;
CHttpFile *pHttpFile;
CString tmpStr;
char inBuf[10000];
UINT nBytesRead;
try
{
pHttpFile =(CHttpFile *) objInetSession.OpenURL(
CString("http://localhost"),
1,
INTERNET_FLAG_TRANSFER_ASCII,
NULL,
0
);
}
catch(CInternetException* exp)
{
AfxMessageBox((LPCTSTR)"Some thing went astay",0,0);
}
nBytesRead = pHttpFile->Read(inBuf, sizeof(inBuf));
AfxMessageBox(CString(inBuf,nBytesRead));
}
return nRetCode; -
Hello, I use this code. It's only a little different and it should answer your Question.
CInternetSession objInetSession;
CHttpFile *pHttpFile;
CString tmpStr;
char inBuf[10000];
UINT nBytesRead;
try
{
pHttpFile =(CHttpFile *) objInetSession.OpenURL(
CString("http://localhost"),
1,
INTERNET_FLAG_TRANSFER_ASCII,
NULL,
0
);
}
catch(CInternetException* exp)
{
AfxMessageBox((LPCTSTR)"Some thing went astay",0,0);
}
nBytesRead = pHttpFile->Read(inBuf, sizeof(inBuf));
AfxMessageBox(CString(inBuf,nBytesRead));
}
return nRetCode; -
Well, you'r entirely welcome. I am most happy to edify.