Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to Save the file on application folder?

Posted on 2006-07-24
3
Medium Priority
?
223 Views
Last Modified: 2010-04-16
Hi Dear Friends,

I am creating one Windows Application in C# using VS.NET 2005.
I have one textbox, a Browse Button & a Save button on my windows form.

When user clicks on browse button, the file name will displayd in the Textbox.
After user clicks on the Save button, then I want to save the file to my application's "Images" folder.

Please, reply if you have the soluton or any trick to do this.

Thanks in advance...

From
-spdude
0
Comment
Question by:spdude
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 35

Accepted Solution

by:
YZlat earned 1600 total points
ID: 17167532
string apppath;
           
            // get your personal application folder
            apppath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.ApplicationData);

            // create application path
            apppath = Path.Combine( apppath, "Images" );

            // create path if it doesn't exist
            if (!Directory.Exists(apppath))
                Directory.CreateDirectory(apppath);

            // append configuration's filename to path string
            apppath = Path.Combine( apppath, "yourfilename.extension" );
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Six Sigma Control Plans

636 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