i Want save image in Project Folder
so ho to get proper Path for Project
please Help me
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Manish Kumar ChoudharyRank #339 · 7.4K reputationPosted Dec 19, 2014, 2:32 AM EST
Assembly.GetExecutingAssembly().GetName().CodeBase);
String strFullPathToMyFile = Path.Combine(strAppDir, "img1.jpeg");
MessageBox.Show(String.Format("Path to the application is: '{0}'." +
"Full path to the file in the application folder is: '{1}'",
strAppDir, strFullPathToMyFile));
Michal HabalcikRank #902 · 2.3K reputationPosted Dec 19, 2014, 2:28 AM EST
System.Reflection.Assembly.GetExecutingAssembly().Location or Application.StartupPath
In a Windows Forms app I would use "Application.StartupPath"
Manish Kumar ChoudharyRank #339 · 7.4K reputationPosted Dec 19, 2014, 2:28 AM EST
string startupPath = System.IO.Directory.GetCurrentDirectory();
string startupPath = Environment.CurrentDirectory;
Manish Kumar ChoudharyRank #339 · 7.4K reputationPosted Dec 19, 2014, 2:23 AM EST
If you're trying to get the ASP.NET local path, use Server.MapPath("~/Images/img.jpeg") to get its fully qualified path.
Saber ShaikhRank #1,687 · 905 reputationPosted Dec 19, 2014, 2:26 AM EST
i want do in windows Application
Saber ShaikhRank #1,687 · 905 reputationPosted Dec 19, 2014, 2:30 AM EST