<?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>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Get current path of the form</title><link>https://www.infopathdev.com:443/forums/thread/55828.aspx</link><pubDate>Sat, 12 Jun 2010 21:20:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:55828</guid><dc:creator>Lawson</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/55828.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=55828</wfw:commentRss><description>&lt;p&gt;I have an IP 2003 form with C# code. &lt;/p&gt;
&lt;p&gt;I am trying to code a button within the form&amp;nbsp;that gets the current directory of the form. &lt;/p&gt;
&lt;p&gt;I am using the following method:&lt;/p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;string&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; path = &lt;/font&gt;&lt;font color="#008080" size="2"&gt;&lt;font color="#008080" size="2"&gt;Directory&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.GetCurrentDirectory();&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;However, this only gets the directory where the form was orignially saved. &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;I tried to integrate this.XDocument into the method, but I was unsuccessful.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;Does anybody have any suggestions?&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;Thanks,&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;-Lawson&lt;/p&gt;&lt;/font&gt;</description></item></channel></rss>