Hosting the InfoPath 2007 Form Editing Environment in a Custom ASP.NET Web Form

A great article on using Infopath 2007 environment programmatically in ASP.NET -

https://msdn2.microsoft.com/en-us/library/aa701078.aspx