MetaDataY
asked on
Grabbing content from an external web server
The application in question is ASP.NET / C#. I have a webform with some text boxes, and it submits via the POST method to a web server out of my control. That web server displays a report in html to the user in the browser window.
What I would like to do is:
- Keep the user on my site instead of leaving to the other site.
- Save the contents of the report to a database.
- Show the report in a new browser window from the content stored in the database in the previous step.
Can somebody point me in the right direction on how to do this?
What I would like to do is:
- Keep the user on my site instead of leaving to the other site.
- Save the contents of the report to a database.
- Show the report in a new browser window from the content stored in the database in the previous step.
Can somebody point me in the right direction on how to do this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ajit Anand, that's what I'm looking for. I had actually found how to do this with HttpWebRequest and HttpWebResponse, where you have to specify content length and stream to the request and streamread the response. WebClient seems to be even easier.
Thank you both for your input!
Thank you both for your input!
Function GetHTML(strURL)
Dim objXMLHTTP, strReturn
Set objXMLHTTP = Server.CreateObject("MSXML
objXMLHTTP.Open "GET", strURL, False
objXMLHTTP.Send
strReturn = objXMLHTTP.responseText
Set objXMLHTTP = Nothing
GetHTML = strReturn
End Function