<?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: Accessing controls in C#</title><link>https://www.infopathdev.com:443/forums/thread/38694.aspx</link><pubDate>Fri, 20 Feb 2009 15:24:20 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:38694</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/38694.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=38694</wfw:commentRss><description>&lt;p&gt;I don&amp;#39;t think using Console.WriteLine() and Console.ReadLine() is going to do much.&amp;nbsp; There is no console in an InfoPath form.&lt;/p&gt;</description></item><item><title>Re: Accessing controls in C#</title><link>https://www.infopathdev.com:443/forums/thread/38692.aspx</link><pubDate>Fri, 20 Feb 2009 15:18:15 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:38692</guid><dc:creator>doit007</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/38692.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=38692</wfw:commentRss><description>&lt;p&gt;it must be mainDataNavigator.SelectSingleNode(&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;/my:myFields/my:bericht&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, NamespaceManager).Value)&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;you&amp;nbsp;placed /my:Fields in place of /my:myFields..check out&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Accessing controls in C#</title><link>https://www.infopathdev.com:443/forums/thread/38687.aspx</link><pubDate>Fri, 20 Feb 2009 13:46:56 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:38687</guid><dc:creator>yoni_R</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/38687.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=38687</wfw:commentRss><description>&lt;p&gt;for the moment, something as simple as&lt;/p&gt;&lt;font size="2"&gt;&lt;font color="#0000ff"&gt;public void&lt;/font&gt;&amp;nbsp;CTRL50_5_Clicked(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;object&lt;/font&gt;&lt;font size="2"&gt; sender, &lt;/font&gt;&lt;font color="#008080" size="2"&gt;ClickedEventArgs&lt;/font&gt;&lt;font size="2"&gt; e)&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;XPathNavigator mainDataSource = MainDataSource.CreateNavigator();&lt;/p&gt;Console.WriteLine(mainDataSource.SelectSingleNode(&amp;quot;/my:Fields/my:bericht&amp;quot;, NamespaceManager).Value); Console.ReadLine(); 
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;is giving us a NullReferenceException.&lt;/p&gt;&lt;/font&gt;</description></item><item><title>Re: Accessing controls in C#</title><link>https://www.infopathdev.com:443/forums/thread/38685.aspx</link><pubDate>Fri, 20 Feb 2009 13:27:34 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:38685</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/38685.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=38685</wfw:commentRss><description>&lt;p&gt;If you post the code you&amp;#39;re trying to use, we might be able to figure out what&amp;#39;s going wrong.&lt;/p&gt;</description></item><item><title>Re: Accessing controls in C#</title><link>https://www.infopathdev.com:443/forums/thread/38679.aspx</link><pubDate>Fri, 20 Feb 2009 10:59:52 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:38679</guid><dc:creator>yoni_R</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/38679.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=38679</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Ok, will try that again then! :)&lt;/p&gt;&lt;p&gt;But the problem was that when we did that we got &amp;quot;KeyNotFoundException&amp;quot;. &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Accessing controls in C#</title><link>https://www.infopathdev.com:443/forums/thread/38678.aspx</link><pubDate>Fri, 20 Feb 2009 10:52:47 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:38678</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/38678.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=38678</wfw:commentRss><description>&lt;p&gt;In InfoPath we don&amp;#39;t access a form&amp;#39;s controls directly, but by accessing the XML document represented by the main data source.&amp;nbsp; An InfoPath form is just a visual representation of an XML document. So if I had a textbox bound to a field with the path myFields/field1, I could change its value like this:&lt;/p&gt;&lt;font size="2"&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;XPathNavigator&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; mainDataNavigator = MainDataSource.CreateNavigator();&lt;br /&gt;mainDataNavigator.SelectSingleNode(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;/my:myFields/my:field1&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, NamespaceManager).Value = &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;Hey!&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;;&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;font size="2"&gt;If you are not yet familiar with the XPathNavigator class, I recommend reading up on it a bit.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.xml.xpath.xpathnavigator.aspx"&gt;http://msdn.microsoft.com/en-us/library/system.xml.xpath.xpathnavigator.aspx&lt;/a&gt;&lt;/p&gt;&lt;/font&gt;</description></item><item><title>Accessing controls in C#</title><link>https://www.infopathdev.com:443/forums/thread/38677.aspx</link><pubDate>Fri, 20 Feb 2009 10:13:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:38677</guid><dc:creator>yoni_R</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/38677.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=38677</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi,&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;we&amp;#39;re trying to make a form (not browser enabled as we are using an mutiple selection listbox) that will enable us to choose a bunch of members. Those members need to receive an email after the send-button is pressed.&lt;/p&gt;&lt;p&gt;The problem we have is that we can&amp;#39;t find a way to access the content of the controls in de form in our code in C#.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Can anyone tell us what we can do to make this happen?&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;thx &lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>