R
Rob Meade
Hi all,
I'm developing a mini Windows app in Visual Studio, and I'm a bit stuck.
I'm more used to developing web based apps, and whilst still new at that
have stumbled across something I cant seem to do - thus require your most
excellent skills to resolve it for me
)
I have an xml file in my project and I need to access it when the
application is run, its like a kinda config file...originally I was just
saying load "rules.xml" - but it kept failing, I did a quick search and
found - Application.StartupPath, which I then used like this:
strRulesPath = Application.StartupPath & "\Rules.xml"
The problem with this is that when I'm developing this it dumps the .exe
into the /bin directory, thus my xml file is a level above..
Using asp.net I could do stuff like:
strPath = Request.ApplicationPath("default.aspx")
for example and it worked a charm, I'm guessing there's an equivalent, but
have yet to find it - can anyone give me a hand with this...
Thanks in advance for any help, and welcoming me to this group
)
Regards
Rob
I'm developing a mini Windows app in Visual Studio, and I'm a bit stuck.
I'm more used to developing web based apps, and whilst still new at that
have stumbled across something I cant seem to do - thus require your most
excellent skills to resolve it for me

I have an xml file in my project and I need to access it when the
application is run, its like a kinda config file...originally I was just
saying load "rules.xml" - but it kept failing, I did a quick search and
found - Application.StartupPath, which I then used like this:
strRulesPath = Application.StartupPath & "\Rules.xml"
The problem with this is that when I'm developing this it dumps the .exe
into the /bin directory, thus my xml file is a level above..
Using asp.net I could do stuff like:
strPath = Request.ApplicationPath("default.aspx")
for example and it worked a charm, I'm guessing there's an equivalent, but
have yet to find it - can anyone give me a hand with this...
Thanks in advance for any help, and welcoming me to this group

Regards
Rob