There are times when you get data from a DB and want to throw an xml file from a web page. To do that, in your aspx code you would have to build the InfoPath xml with the PI information using methods in the System.Xml namespace (or StringBuilder String.Format etc). This xml string is then given as input to the SendContent function shown below. ...