<?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>Browser Forms</title><link>https://www.infopathdev.com:443/forums/40.aspx</link><description>For browser form specific questions</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Error in submiting from code behind</title><link>https://www.infopathdev.com:443/forums/thread/55232.aspx</link><pubDate>Sun, 23 May 2010 13:11:39 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:55232</guid><dc:creator>anirudh</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/55232.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=55232</wfw:commentRss><description>Hi i got the same error, when i am trying to populate the repeat tables to sharepoint list, 


System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary. 
at System.ThrowHelper.ThrowKeyNotFoundException() 
at System.Collections.Generic.Dictionary`2.get_Item(TKey key) 
at Microsoft.Office.InfoPath.Server.SolutionLifetime.DataAdapters.get_Item(String name) 
at Microsoft.Office.InfoPath.Server.DocumentLifetime.DataAdapters.EnsureDataAdapter(String name) 
at Microsoft.Office.InfoPath.Server.DocumentLifetime.DataAdapters.get_Item(String name) 
at Microsoft.Office.InfoPath.Server.DocumentLifetime.DataConnectionCollectionHost.&amp;lt;&amp;gt;c__DisplayClass4.b__3() 
at Microsoft.Office.InfoPath.Server.DocumentLifetime.OMExceptionManager.ExecuteOMCallWithExceptions(OMCall d, ExceptionFilter exceptionFilter)


I have a event handler in the internal startup fucntion,


 ((ButtonEvent)EventManager.ControlEvents[&amp;quot;Submit&amp;quot;]).Clicked += new ClickedEventHandler(Submit_Clicked);


And also the location i am supplying this way,


  FileSubmitConnection SubmitConnection = (FileSubmitConnection)this.DataConnections[&amp;quot;Main submit&amp;quot;];
                SubmitConnection.FolderUrl = LibLocation.Substring(0, LibLocation.LastIndexOf(&amp;quot;/&amp;quot;));
                SubmitConnection.Execute();


there is a weird thing happening, when i submit the form for the first time, only the first row of the repeater table is saved, with the above error, then if i save the same form with out closing, i am able to save all the rows to the SP list, 


Please suggest me what should i do to save all the rows in the first time and not get this error,


Thanks in advance :)</description></item><item><title>Re: Error in submiting from code behind</title><link>https://www.infopathdev.com:443/forums/thread/36046.aspx</link><pubDate>Thu, 18 Dec 2008 15:35:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:36046</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/36046.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=36046</wfw:commentRss><description>&lt;p&gt;Hi there -- double check the name of your submit data connection and verify that it is called &amp;#39;NNGSubmit&amp;quot;, including using the same case. &lt;/p&gt;</description></item><item><title>Error in submiting from code behind</title><link>https://www.infopathdev.com:443/forums/thread/36035.aspx</link><pubDate>Thu, 18 Dec 2008 14:37:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:36035</guid><dc:creator>Pundya</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/36035.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=36035</wfw:commentRss><description>&lt;p&gt;Hi i am submitting my form from code behind. I am not writing a code for that.i wrote following code&lt;/p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Dim&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; submitConnection &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; FileSubmitConnection = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;DirectCast&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Me&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.DataConnections(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;NNGSubmit&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;), FileSubmitConnection)&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;submitConnection.FolderUrl =&amp;quot;&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&lt;a href="http://nrdes-wwint01d:7/NNgTest1"&gt;http://nrdes-wwint01d:7/NNgTest1&lt;/a&gt;&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;submitConnection.Execute()&lt;/p&gt;
&lt;p&gt;But my code is giving following error&lt;/p&gt;
&lt;p&gt;The given key was not present in the dictionary. &lt;br /&gt;&lt;br /&gt;System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary. &lt;br /&gt;at System.ThrowHelper.ThrowKeyNotFoundException() &lt;br /&gt;at System.Collections.Generic.Dictionary`2.get_Item(TKey key) &lt;br /&gt;at Microsoft.Office.InfoPath.Server.SolutionLifetime.DataAdapters.get_Item(String name) &lt;br /&gt;at Microsoft.Office.InfoPath.Server.DocumentLifetime.DataAdapters.EnsureDataAdapter(String name) &lt;br /&gt;at Microsoft.Office.InfoPath.Server.DocumentLifetime.DataAdapters.get_Item(String name) &lt;br /&gt;at Microsoft.Office.InfoPath.Server.DocumentLifetime.DataConnectionCollectionHost.&amp;lt;&amp;gt;c__DisplayClass4.&amp;lt;get_Item&amp;gt;b__3() &lt;br /&gt;at Microsoft.Office.InfoPath.Server.DocumentLifetime.OMExceptionManager.ExecuteOMCallWithExceptions(OMCall d, ExceptionFilter exceptionFilter)&lt;br /&gt;&lt;br /&gt;i think error is here plese help me&lt;/p&gt;
&lt;p&gt;submitConnection.FolderUrl =&amp;quot;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&lt;a href="http://nrdes-wwint01d:7/NNgTest1"&gt;http://nrdes-wwint01d:7/NNgTest1&lt;/a&gt;&amp;quot; &lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#800000"&gt;Thanks&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#800000"&gt;Pundya&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;</description></item></channel></rss>