How would one go about using a dynamic connection string without hardcoding it onto every page method?
Normally, I would just put it in the app.config, but some of the pages use an OpenFileDialog, which then uses the path of the file, causes the path to the database file to error out. If I use: System.Windows.Forms.Application.StartupPath, it works great if I put the database in the /bin/debug folder, but as soon as I recompile the project, the database (Access) gets wiped out.
How would I go about with one connection string that can be used for all pages / forms regardless of whether that pages uses an OpenFileDialog object or not?