How to Post using Managed Code

R

RickM

I can do this using the submit form menu options and suppling an aspx
page to use, but what if I want to do it programatically? I tried
adding a reference to the MSXML com object but I cant compile; getting
ambiguous reference to stuff in the
Microsoft.Office.Interop.InfoPath.SemiTrust reference.

How do you create an XMLHTTP object with open and submit functions
using Managed Code. I would like to be able to read the submit url
from a file instead of having hard coded within IP. Or, would just
like to know how to do the submit in code.

Thanks
RickM
 
A

Andrew Ma [MSFT]

In Managed Code, you should use the System.Net namespace to post data. Look
up the System.Net.WebRequest class.

--
Andrew J. Ma
Software Test Engineer
Microsoft Office InfoPath
http://blogs.msdn.com/ajma
---------------------------------------
This posting is provided "As Is" with no warranties, and confers no rights.
Use of any included script sample are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.
Please do not send email directly to this alias. This alias if for
newsgroup purposes only.
 
Top