Win Surprise Gifts!!!
Top 5 Contributors of the Month
Post New Question
Subscribe to Forum
How to open local system folder from the browser
July 08, 2014
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");
System.Diagnostics.Process prc = new System.Diagnostics.Process();
prc.StartInfo.FileName = windir + @"\explorer.exe";
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,
Posted Date: July 29, 2014 Points: 20
Go through the below link, you will find the solution-
Posted Date: August 08, 2014 Points: 20
Please find the below URL, It will shed some light on
Posted Date: September 02, 2014 Points: 20
c# display images from local drives
This article helps you to display an image from your local drive
Display Images from Local Drives
Normally we will have the images inside the folder in our application root folder. The source selector dialog box will point to the application folder only, there is no direct option to select the images existing outside the application folder but there is a work around for this to display the images available in the physical drive. ofcourse it is really meaningless to set the source of the image in the physical drive. Rare cases will be there to display the already available image in the local drives for some scenario.
Let us see in detail on how to display the images from our local folder
Methods of Implementation
As a first step, we can have a new aspx page, In my example i have named the page as "SampleImage.aspx".
In the page load event of the SampleImage.aspx.cs we can have the below lines of code;
protected void Page_Load(object sender, EventArgs e)
Response.ContentType = "image/png"; // for .png extension
string PhysicalImageName = @"C:\filing.png";
Now we can get easily set the source of the image in the Target pages using the below line of declaration in the aspx page as;
<img src="SampleImage.aspx" alt="Admin" runat="server"/>
- See more at: http://dotnetbites.com/display-images-from-local-drives#sthash.h0KoepKc.dpuf
Subhransu Sekhar Jena
Posted Date: June 25, 2015 Points: 20
You can do this using IE Only. But for this you have to enable the activex control of IE Other wise use node.js or HTMLS or Any advanced Java script framework.
To post reply
Related Questions Related Questions
How to copy a file from server to local system
How to open pop up in separate browser
Have to open and set the range in excel sheet through C#.NET codings
parameter in the browser address bar. How can I prevent this ?
How to Upload One file and store in one Folder in C# with Windows...
Need to open popup window from the GridView
How to open one .chm help file in c# windows application menu bar....
how to open pop up in different window
how to resize browser at runtime
how to Get Local users
Latest Forum Questions From The Same Category
how to learn and Where can i Learn about ASP .Net
Slash(/) in Combobox
attaching the report in the web page
How do i get payment status in redirect page using bitpay?
Login with Facebook and Save details in database
Login with facebook account in my website
How to make a nested datalist control?
What class does Icon derive from?
What are the validation controls?
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more
Quick Links For Forum Categories:
Hall of Fame
Terms of Service
Tell A Friend