<?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: Submit button with rules and managed code. Browser enabled form.</title><link>https://www.infopathdev.com:443/forums/thread/53566.aspx</link><pubDate>Mon, 12 Apr 2010 05:48:10 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:53566</guid><dc:creator>Qazi Anis</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/53566.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=53566</wfw:commentRss><description>&lt;p&gt;if you are using a submit button and written that code in submit event then you need to write the below line also &lt;/p&gt;&lt;font size="2"&gt;
&lt;p&gt;e.CancelableArgs.Cancel = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;true&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;also in the Redirect you might need to use a string variable instead of hardcoding. sometimes long hardcoded values dont work properly. it is better to assign them to some strign variable and then pass that variable to the Redirect statement&lt;/p&gt;&lt;/font&gt;</description></item><item><title>Re: Submit button with rules and managed code. Browser enabled form.</title><link>https://www.infopathdev.com:443/forums/thread/53553.aspx</link><pubDate>Sat, 10 Apr 2010 06:24:57 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:53553</guid><dc:creator>amarnathsahu</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/53553.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=53553</wfw:commentRss><description>&lt;p&gt;Thanks Qazi.&lt;/p&gt;
&lt;p&gt;Actually when&amp;nbsp;I asked about debugging the managed code infopath forms I meant broswer enabled forms. May be what you said works well with infopath client&amp;nbsp;forms.&lt;/p&gt;
&lt;p&gt;Also any idea on what is going wrong in my case. Anyone?&lt;/p&gt;</description></item><item><title>Re: Submit button with rules and managed code. Browser enabled form.</title><link>https://www.infopathdev.com:443/forums/thread/53525.aspx</link><pubDate>Fri, 09 Apr 2010 14:09:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:53525</guid><dc:creator>Qazi Anis</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/53525.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=53525</wfw:commentRss><description>&lt;p&gt;1) rules get executed before code.&lt;/p&gt;
&lt;p&gt;2) by default after submission the form is redirected to the page that is mentioned in the source Parameter in address bar. &lt;/p&gt;
&lt;p&gt;3) to debug managed code, put breakpoints on the form code and just press f5,&lt;/p&gt;</description></item><item><title>Submit button with rules and managed code. Browser enabled form.</title><link>https://www.infopathdev.com:443/forums/thread/53514.aspx</link><pubDate>Fri, 09 Apr 2010 10:31:39 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:53514</guid><dc:creator>amarnathsahu</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/53514.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=53514</wfw:commentRss><description>&lt;p&gt;Hello &lt;/p&gt;
&lt;p&gt;I am developing an infopath form that requires to be redirected to the main page after the processing is complete, the page should be redirected in around 10 seconds. I have come to know from&amp;nbsp;some of&amp;nbsp;posts in other forums and others that infopath does not have any inbuilt functionality to redirect to a page of your choice. So what I have done is that I right clicked on the button and&amp;nbsp;do a &amp;quot;Edit form code&amp;quot;. On button click&amp;nbsp;I wrote only&amp;nbsp;these 2&amp;nbsp;statements&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;u&gt;Thread.Sleep(10000); &lt;/u&gt;&lt;/p&gt;
&lt;p&gt;&lt;u&gt;System.Web.HttpContext.Current.Response.Redirect(&amp;quot;&lt;/u&gt;&lt;a href="http://localhost:333/sites/Intranet/Development/default.aspx"&gt;http://localhost:333/sites/Intranet/Development/default.aspx&lt;/a&gt;&lt;u&gt;&amp;quot;);&amp;nbsp;&lt;/u&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;The rules on button click specify form data&amp;nbsp;Submit on certain conditons and not on others. Before writing this code everything worked fine. The form got submitted properly, every rule worked. But after adding this code to the template when I fill out&amp;nbsp;a form and submit&amp;nbsp;using this template I get this error on clicking the button:&amp;nbsp;&lt;strong&gt;&amp;quot;An error occurred submitting this form to the Web Server&amp;quot;. &lt;/strong&gt;No rule seems to be working. &lt;/p&gt;
&lt;p&gt;I have a few questions on this one and related:&lt;/p&gt;
&lt;p&gt;1. Foremost, how to get rid of this issue?&lt;/p&gt;
&lt;p&gt;2. When there are both rules and code on a button click what is the order in which the execution takes place.&lt;/p&gt;
&lt;p&gt;3. Does this error mean that I will have to rewrite my rules&amp;nbsp;in the form of&amp;nbsp;code?&lt;/p&gt;
&lt;p&gt;4. Any codeless work around for this?&lt;/p&gt;
&lt;p&gt;5. How to debug infopath managed code?&lt;/p&gt;
&lt;p&gt;Appreciate any help. Thanks in advance.&lt;/p&gt;</description></item></channel></rss>