How to open local system folder from the browser RRS feed

  • Question

  • Hi All,

    I'm working on some stuff, wherein the user downloads the files from internet to his local machine. I'm able to catch the path of the folder where user wants to download the file from SaveAs prompt. Now my requirement is , i want to provide a link button or a button on the web page and assign this is folder path dynamically so that when the user clicks on it, it should open the local system folder where he has downloaded the files.

    string myDocspath =Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
    string windir = Environment.GetEnvironmentVariable("WINDIR");
    Process prc = new System.Diagnostics.Process();
    prc.StartInfo.FileName = windir + 
    prc.StartInfo.Arguments = myDocspath;

    Work fine with local system, if i host the application in IIS , the above code snippet wont work

    Thanks in advance,

    Suraj Kumar 

    Software Engineer

    Tuesday, July 8, 2014 8:56 AM


All replies