<?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 Form Controls in VSTA ---Problem</title><link>https://www.infopathdev.com:443/forums/thread/21644.aspx</link><pubDate>Fri, 13 Jul 2007 03:29:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:21644</guid><dc:creator>Curious</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/21644.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=21644</wfw:commentRss><description>thanks!!!!!!!!</description></item><item><title>Re: Accessing Form Controls in VSTA ---Problem</title><link>https://www.infopathdev.com:443/forums/thread/21558.aspx</link><pubDate>Mon, 09 Jul 2007 18:19:24 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:21558</guid><dc:creator>davidair</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/21558.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=21558</wfw:commentRss><description>&lt;p&gt;Yes, the OM has changed a lot and now you have to use Navigators... here is an example:&lt;/p&gt;&lt;font size="2"&gt;&lt;p&gt;&lt;font color="#2b91af" size="2"&gt;XPathNavigator&lt;/font&gt;&lt;font size="2"&gt; rootNavigator = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;this&lt;/font&gt;&lt;font size="2"&gt;.MainDataSource.CreateNavigator();&lt;br /&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;XPathNavigator&lt;/font&gt;&lt;font size="2"&gt; radioButtonPersonal = rootNavigator.SelectSingleNode(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;/my:myFields/my:radioButtonPersonal&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;this&lt;/font&gt;&lt;font size="2"&gt;.NamespaceManager);&lt;br /&gt;radioButtonPersonal.SetValue(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;2&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;);&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;XPathNavigator&lt;/font&gt;&lt;font size="2"&gt; rootNavigator = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;this&lt;/font&gt;&lt;font size="2"&gt;.MainDataSource.CreateNavigator();&lt;br /&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;XPathNavigator&lt;/font&gt;&lt;font size="2"&gt; radioButtonPersonal = rootNavigator.SelectSingleNode(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;/my:myFields/my:radioButtonPersonal&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;this&lt;/font&gt;&lt;font size="2"&gt;.NamespaceManager);&lt;br /&gt;radioButtonPersonal.SetValue(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;2&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;);&lt;/font&gt;&lt;p&gt;A few interesting points:&lt;/p&gt;&lt;p&gt;- Unlike in 2003, you need to pass the namespaceManager in explicitly or else prefixes such as &amp;quot;my&amp;quot; won&amp;#39;t resolve.&lt;br /&gt;- Navigators are tricky beasts - unlike IXMLDOMNode objects, they are merely pointers into the XML tree and can change under you. If you pass navigators along, it might be wise to call Clone() on them - a navigator clone is not an expensive operation.&lt;br /&gt;- To get node&amp;#39;s value, you can use the Value property, but it cannot be assigned to to set value you have to call SetValue(). The value property will be empty for inner nodes - use InnerXml instead.&lt;/p&gt;&lt;p&gt;Hope this helps!&lt;/p&gt;</description></item><item><title>Re: Accessing Form Controls in VSTA ---Problem</title><link>https://www.infopathdev.com:443/forums/thread/21542.aspx</link><pubDate>Mon, 09 Jul 2007 08:49:23 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:21542</guid><dc:creator>nukkumatti</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/21542.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=21542</wfw:commentRss><description>&lt;p&gt;IP 2007 object model is a bit different. instead of using thisXDocument have a look for XPathNavigator.&lt;/p&gt;&lt;p&gt;Hope this helps&lt;/p&gt;</description></item><item><title>Accessing Form Controls in VSTA ---Problem</title><link>https://www.infopathdev.com:443/forums/thread/21541.aspx</link><pubDate>Mon, 09 Jul 2007 08:20:35 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:21541</guid><dc:creator>Curious</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/21541.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=21541</wfw:commentRss><description>&lt;p&gt;Hi IP Gurus&lt;br /&gt; &lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; When using VS 2003 for coding IP 2003 form we were using this syntax to access a textbox property: &lt;strong&gt;thisXDocument.DOM.selectSingleNode(&amp;quot;my:myFields/my:field1&amp;quot;).text.&lt;/strong&gt; Similarly to access a radio button we were using &lt;/p&gt;&lt;p&gt;&lt;strong&gt;IXMLDOMNode myRadioButton = thisXDocument.DOM.selectSingleNode(&amp;quot;my:myFields/my:radioButtonPersonal&amp;quot;);&lt;/strong&gt; and then &lt;strong&gt;myRadioButton.text &lt;/strong&gt;etc. &lt;/p&gt;&lt;p&gt;However the above syntax did not work for IP 2007 form using VSTA. Can anyone please help that how can one access the textboxes and other form controls in IP 2007 forms using VSTA in C# code.&lt;br /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;thanks in advance&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>