質問

I have to interact with a 3rd party web service. I call a method in the service using POST and it returns a web page. This works fine, but the problem I have is that the web request is called from a windows forms application and the 3rd party expects the response to be shown in a browser. It sounds like it should be possible but I can't think of a way of passing the response to the browser.

役に立ちましたか?

解決 2

Ok, very silly of me. Using the WebBrowser control was indeed the answer. But it had extra parameters, in the Navigate method, that allowed you to pass in post data. Don't know how I overlooked this. Thanks for the help anyway.

他のヒント

The WebBrowser control is your best bet here.

The control exposes a DocumentStream property that lets you load content from a stream:

http://msdn.microsoft.com/en-us/library/system.windows.forms.webbrowser.documentstream.aspx

You could also use the DocumentText property:

http://msdn.microsoft.com/en-us/library/system.windows.forms.webbrowser.documenttext.aspx

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top