How to save the file on Desktop by default by using ExportToDisk method??? or is there any way around??
Please help..
Export the file by default on Desktop....?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
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
Dorababu MekaRank #457 · 5.5K reputationPosted Apr 22, 2011, 2:17 AM EDT
var desktopFolder = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory); var fullFileName = Path.Combine(desktopFolder, "Test.txt"); var fs = new FileStream(fullFileName, FileMode.Create);CrishRank #1,486 · 1.1K reputationPosted Apr 22, 2011, 2:18 AM EDT
string add;
add="C:\Windows\Desktop";
MyReport.ExportToDisk(ExportFormatType.PortableDocFormat,"add + MyReport");