<?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>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: how to open a new infoPath web form from an infoPath web form with managed code</title><link>https://www.infopathdev.com:443/forums/thread/73202.aspx</link><pubDate>Thu, 22 Dec 2011 15:43:16 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:73202</guid><dc:creator>canadiense</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/73202.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=73202</wfw:commentRss><description>&lt;p&gt;Francois (still in London?) ...&lt;/p&gt;&lt;p&gt;Wondering if you ever figured this one out ... I know this was posted a long time ago, so I&amp;#39;m just askin&amp;#39;! :)&lt;/p&gt;&lt;p&gt;Thanks.&lt;/p&gt;</description></item><item><title>how to open a new infoPath web form from an infoPath web form with managed code</title><link>https://www.infopathdev.com:443/forums/thread/52286.aspx</link><pubDate>Mon, 01 Mar 2010 10:30:38 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:52286</guid><dc:creator>FrancoisInLondon</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/52286.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=52286</wfw:commentRss><description>&lt;div class="ForumPostContentText"&gt;
&lt;p&gt;&lt;font color="blue"&gt;(I did post &amp;nbsp;this question in the infopath/sharepoint forum, but now realised it&amp;#39;s a general infopath newbie and not just sharepoint related, so here it is if someone can give directions for help, thanks.)&lt;/font&gt;&lt;/p&gt;
&lt;hr /&gt;

&lt;p&gt;I am having an issue with infoPath Forms and C#, &lt;br /&gt;I have a 1st form open to the user, and when he click a button it opens a 2nd form.&lt;/p&gt;
&lt;p&gt;Sounds pretty easy, but I have tried many ways and still error.&lt;br /&gt;(environment is InfoPath Forms 2007 in Sharepoint and code: C#)&lt;/p&gt;
&lt;p&gt;this is what I have:&lt;br /&gt;- form1 . a text field where I enter the URL of form2&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; . a button with code below&lt;/p&gt;
&lt;p&gt;The issue is that if I type the URL of form2 &lt;br /&gt;(&lt;a href="http://sharepointserver/sites/MySiteCol/Myinfopath/_layouts/FormServer.aspx?XsnLocation=http://sharepointserver/sites/MySiteCol/FormServerTemplates/form2.xsn&amp;amp;SaveLocation=http://sharepointserver/sites/Myinfopath/InfoPathLib"&gt;http://sharepointserver/sites/MySiteCol/Myinfopath/_layouts/FormServer.aspx?XsnLocation=http://sharepointserver/sites/MySiteCol/FormServerTemplates/form2.xsn&amp;amp;SaveLocation=http://sharepointserver/sites/Myinfopath/InfoPathLib&lt;/a&gt;)&lt;br /&gt;&amp;nbsp;in the text field and press the button I get this error&lt;br /&gt;&amp;quot;Critical Error : An error occurred submitting this form to the Web server. The form will now be closed.&amp;quot;&lt;/p&gt;
&lt;p&gt;But instead of the URL of form2.xsn I type &lt;a href="http://www.google.com/"&gt;http://www.google.com/&lt;/a&gt; they it works (well except the image somehow, but that&amp;#39;s not the problem)&lt;/p&gt;
&lt;p&gt;&lt;em&gt;using Microsoft.Office.InfoPath;&lt;br /&gt;using System;&lt;br /&gt;using System.Xml;&lt;br /&gt;using System.Xml.XPath;&lt;br /&gt;using System.Web;&lt;br /&gt;&amp;nbsp;// get the text field entry&lt;br /&gt;string out_URL&amp;nbsp; = MainDataSource.CreateNavigator().SelectSingleNode(&amp;quot;/my:myFields/my:textURLField&amp;quot;, NamespaceManager).Value;&lt;br /&gt;// now go to that URL&lt;br /&gt;&lt;strong&gt;HttpContext.Current.Response.Redirect(out_URL&amp;nbsp; , false);&lt;/strong&gt; --&amp;gt; is not working for complex address, but works for simple domain (&lt;a href="http://google.com/"&gt;http://google.com/&lt;/a&gt;)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;PS: form1 &amp;amp; form2 are both Forms compatible + FullTrust security.&lt;/p&gt;
&lt;p&gt;So.. WHAT&amp;#39;S WRONG WITH THIS or WHAT IS THE BETTER WAY TO OPEN A NEW FORM FROM AN INFOPATH FORM ?&amp;nbsp; &lt;br /&gt;(please don&amp;#39;t say &amp;quot;Application.XmlForms.NewFromFormTemplate&amp;quot; as it&amp;#39; not compatible with InfoPath forms, only client)&lt;/p&gt;
&lt;p&gt;Many many thanks, you would save my day/week/infopath future projects.&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;</description></item><item><title>Open a new infoPath web form from an infoPath web form with managed code</title><link>https://www.infopathdev.com:443/forums/thread/52255.aspx</link><pubDate>Fri, 26 Feb 2010 20:01:33 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:52255</guid><dc:creator>FrancoisInLondon</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/52255.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=52255</wfw:commentRss><description>&lt;p&gt;I am having an issue with infoPath Forms and C#, &lt;br /&gt;I have a 1st form open to the user, and when he click a button it opens a 2nd form.&lt;/p&gt;
&lt;p&gt;Sounds pretty easy, but I have tried many ways and still error.&lt;br /&gt;(environment is InfoPath Forms 2007 in Sharepoint and code: C#)&lt;/p&gt;
&lt;p&gt;this is what I have:&lt;br /&gt;- form1 . a text field where I enter the URL of form2&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; . a button with code below&lt;/p&gt;
&lt;p&gt;The issue is that if I type the URL of form2 &lt;br /&gt;(&lt;a href="http://sharepointserver/sites/MySiteCol/Myinfopath/_layouts/FormServer.aspx?XsnLocation=http://sharepointserver/sites/MySiteCol/FormServerTemplates/form2.xsn&amp;amp;SaveLocation=http://sharepointserver/sites/Myinfopath/InfoPathLib"&gt;http://sharepointserver/sites/MySiteCol/Myinfopath/_layouts/FormServer.aspx?XsnLocation=http://sharepointserver/sites/MySiteCol/FormServerTemplates/form2.xsn&amp;amp;SaveLocation=http://sharepointserver/sites/Myinfopath/InfoPathLib&lt;/a&gt;)&lt;br /&gt;&amp;nbsp;in the text field and press the button I get this error&lt;br /&gt;&amp;quot;Critical Error : An error occurred submitting this form to the Web server. The form will now be closed.&amp;quot;&lt;/p&gt;
&lt;p&gt;But instead of the URL of form2.xsn I type &lt;a href="http://www.google.com/"&gt;http://www.google.com&lt;/a&gt; they it works (well except the image somehow, but that&amp;#39;s not the problem)&lt;/p&gt;
&lt;p&gt;&lt;em&gt;using Microsoft.Office.InfoPath;&lt;br /&gt;using System;&lt;br /&gt;using System.Xml;&lt;br /&gt;using System.Xml.XPath;&lt;br /&gt;using System.Web;&lt;br /&gt;&amp;nbsp;// get the text field entry&lt;br /&gt;string out_URL&amp;nbsp; = MainDataSource.CreateNavigator().SelectSingleNode(&amp;quot;/my:myFields/my:textURLField&amp;quot;, NamespaceManager).Value;&lt;br /&gt;// now go to that URL&lt;br /&gt;&lt;strong&gt;HttpContext.Current.Response.Redirect(out_URL&amp;nbsp; , false);&lt;/strong&gt; --&amp;gt; is not working for complex address, but works for simple domain (&lt;a href="http://google.com/"&gt;http://google.com&lt;/a&gt;)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;PS: form1 &amp;amp; form2 are both Forms compatible + FullTrust security.&lt;/p&gt;
&lt;p&gt;So.. WHAT&amp;#39;S WRONG WITH THIS or WHAT IS THE BETTER WAY TO OPEN A NEW FORM FROM AN INFOPATH FORM ?&amp;nbsp; &lt;br /&gt;(please don&amp;#39;t say &amp;quot;Application.XmlForms.NewFromFormTemplate&amp;quot; as it&amp;#39; not compatible with InfoPath forms, only client)&lt;/p&gt;
&lt;p&gt;Many many thanks, you would save my day/week/infopath future projects.&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>