Solved

Using a variable to store files in the Application Directory?

Posted on 2014-10-15
2
92 Views
Last Modified: 2014-10-16
My application has functionality where it can store PDF files within a directory called "Certificates" somewhere inside the App directory structure. My question is, where would be the best place to store "Certificates" that will always be where it should be regardless of where on a drive the application is installed? Also, how do I access that directory within my VB.Net code. I've done this once before but it's been awhile and I don't remember what the object is to accomplish this.

Thanks!
0
Comment
Question by:BlakeMcKenna
2 Comments
 
LVL 29

Accepted Solution

by:
Paul Jackson earned 500 total points
ID: 40383330
You can use Application.StartupPath within your application to determine the path where your executable is on the drive, then your would append the string "\Certificates" to it to get your path for where to store your PDFs.
0
 

Author Closing Comment

by:BlakeMcKenna
ID: 40384117
Thanks Paul...that's what I was looking for.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now