<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>"Send to recipient" from asp.net page</title><link>https://www.infopathdev.com:443/forums/thread/40483.aspx</link><pubDate>Thu, 09 Apr 2009 15:22:39 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:40483</guid><dc:creator>tolga</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/40483.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=40483</wfw:commentRss><description>&lt;p&gt;I created a very simply infopath form with I submit &amp;quot;to email&amp;quot;. A wizard, in the infopath client, takes me through the steps on submitting the template as an email. The recipient gets the form as part of the email body. Great! Now I need to do the same thing using asp.net&lt;/p&gt;
&lt;p&gt;I did a lot of research and have not found much. &lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div&gt;How do I open an infopath template in managed code, c#, asp.net?&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;I added references to the Microsoft.Office.Infopath namespace. Now, I have access to the OM, but I have no clue how to deal with the file/template.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;I found code which demonstrates how to submt the form using VSTO.&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;var objEmailAdapter;&lt;br /&gt;var varTo = XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:EmailInfo/my:To&amp;quot;);&lt;br /&gt;var varCC = XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:EmailInfo/my:CC&amp;quot;);&lt;br /&gt;var varBCC = XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:EmailInfo/my:BCC&amp;quot;);&lt;br /&gt;var varIntro = XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:EmailInfo/my:Intro&amp;quot;);&lt;br /&gt;var varSubject = XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:EmailInfo/my:Subject&amp;quot;); &lt;br /&gt;&lt;br /&gt;objEmailAdapter = XDocument.DataAdapters(&amp;quot;Email Adapter Name&amp;quot;); &lt;br /&gt;objEmailAdapter.To = varTo.text;&lt;br /&gt;objEmailAdapter.CC = varCC.text;&lt;br /&gt;objEmailAdapter.BCC = varBCC.text;&lt;br /&gt;objEmailAdapter.Intro = varIntro.text;&lt;br /&gt;objEmailAdapter.Subject = varSubject.text; &lt;br /&gt;objEmailAdapter.Submit();&lt;/p&gt;
&lt;p&gt;All what I need to&amp;nbsp;find out is how to do this in C# and asp.net. Any help is appreciated&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>