Opening A Folder In A New Browser?
Sep 13, 2010
Developing a web application in C# which stores files in a tree structure in a server.
A project ( eg: ABC) has many sub folders (eg: ABC_sub1,ABC_Sub2...etc) . Each sub folder will have many types of files. (Eg: .dat,.txt .... etc)
I have stored the project name and the path to the parent folder ( in this case ABC) in a database.
Eg: \sereverNameTestMyProjectABC
What I need to do is when a user selects a given project ( eg; ABC) & clicks the link button component called "browse" to open the folder (\sereverNameTestMyProjectABC) in a new window.
This is the code I thought would work.
protected void LinkButtonFolderBorwse_Click(object sender, EventArgs e)
{
string myPath = @HiddenFieldFolderLocation.Value;
System.Diagnostics.Process prc = new System.Diagnostics.Process();
prc.StartInfo.FileName = myPath;
prc.Start();
}
HiddenFieldFolderLocation.Value gets the path of the parent folder (\sereverNameTestMyProjectABC).
When I click the link button nothing happens.
View 3 Replies
Similar Messages:
Jul 29, 2010
Is it possible to open a PDF always in a browser? That is no Download option will be provided by browser as a user will try to open that pdf file. My application is in ASP.NET (C#).
View 5 Replies
Mar 24, 2011
I am maintaining an ASP website and the users want to be able to click on a link that open up a folder where they could select which file they want from within that folder.
I tried to making a link with the tag <a href=[folderpath]>Text</a> but I can a 403 HTTP error saying that the website requires a login for this action. Is there some way that I could send the person's credentials along with the request so the folder can be opened?
View 2 Replies
Jul 9, 2010
It seems that the ability to do this in anyway was stopped many, many versions of IE ago.
However, I need to do it SOMEHOW.
I want to be able to select a radiobuttonlist option, click a button and the correct folder opens in explorer
View 11 Replies
Feb 19, 2011
I'm retrieveing pdf file from SQL Server 2008 and i wish to display it in new browsers tab. I successfully retrieved and displayed pdf document when i had pdf viewer installed.
My problem is, that after i unistalled pdf viewer, i got this window, which would be ok if the file wasn't WebForm2.aspx but let's say MyDocument.PDF
Am i doing something wrong? How could i achive that the file would be FileName.pdf and not FileName.aspx (in case of no viewer).
vb code (i can provide c# on request)
[Code]....
View 14 Replies
Apr 15, 2010
I need to open a second browser window or tab, but it must have a different session ID.
Opening the new browser window from an ASP.NET page is easy, but then it shares the same cookie and thus session ID with the original.
View 3 Replies
Mar 22, 2010
i have an action that return a file content. i added:
Response.AddHeader("Content-Disposition", "attactment; filename:"" + survey.File + """);
so that the image would be opened in another tab/page, gets opened in the current tab/page. whats wrong with the header?
View 2 Replies
Dec 17, 2010
We have an application that displays files in a network directory path and wondered if there is a way to open Windows Explorer (or something similar to show/open files or subfolders) from the browser and have it display the files and folders in that path.
View 1 Replies
Sep 20, 2010
I have an asp.net project both in .net 2005 and 2008.It is working fine in my PC and page is opening from browser but not from other PC.I can able to connect the other pc's,ping it sure there is no connection problem with pc.I think should be in IIS or sharing from my PC.I need both in .net 2005 and 2008.
View 2 Replies
May 17, 2010
I have a button event when forces a download to the users browser, but I would like to know whether there is a way for the download open in a new sized browser window. Is there away to do this?
View 5 Replies
May 23, 2010
I have a master page, which has menus and submenus, and content pages in my project.
Now in one of the content pages, i need to open a excel file, displaying an Open/save dialog box) should be visible.
I tries using the inline option for Response.AddHeader, but does not display the master page part on the browser.
View 4 Replies
Dec 19, 2010
I have an ASP.NET/C# application that exports some data into an Excel spreadsheet using COM interop at the click of a Button control. When I click the button, Excel is opened with the generated spreadsheet. For what it's worth, here is the button code:
<asp:Button ID="export" Text="Export to spreadsheet" runat="server" OnClick="Export_Workbook" />
This works fine, except when I click the button, close the subsequent spreadsheet, and refresh the page. When the page is refreshed after clicking the button, the call to Export_Workbook() is made again and so the spreadsheet opens again. Firefox, for example, says this when you refresh: "To display this page, Firefox must send information that will repeat any action (such as a search or order confirmation) that was performed earlier." This is something I want to avoid.
I'm sure there's a better way to accomplish what I'm trying to do, I'm just not sure what the best approach is.
Edit
I've accomplished this by doing the following:
protected void Export_Workbook(object sender, EventArgs e)
{
Response.Redirect(Request.Url.AbsolutePath, false);
ItemList.Prepare_Workbook();
}
View 2 Replies
Nov 1, 2010
We have this great asp.net web application that generates word documents (wordprocessingML) and saves them to the file system on the server. We are running IIS 6.0. I would like to know the best way to allow the user to click a link or something so they can open the document from the browser. I have been experimenting with the Microsoft.Office.Interop.Word object, but am getting an error when I try to active the application object. I don't know if using this object is the best approach or if I should be doing something else.
View 1 Replies
Jan 5, 2010
A requirement for within an ASP.Net application to open a Word template from within the browser and pass in some parameters to a MS Word plugin that will be installed on the client.Is it possible when opening Word from the browser to pass in any parameters and if so how do you go about this?
View 2 Replies
Jul 21, 2010
i am trying to open a pdf stream in browser but can't acomplish that.
i am using ICallBackEventHandler and when i get the data from the client side i call my function to open stream but this dose not work.
However when i try to do that without ICallBack this works(so the ICallBack is the problem)
this is my code in cs
public
partial
class
Default4 : System.Web.UI.Page,ICallbackEventHandler
{
{
[Code]....
View 4 Replies
Nov 6, 2010
So, I have a webForm that has an ImageButton. This ImageButton has to open a file (said file is uploaded by the user in another web form. The file is saved to \serverNamefiles; it can be a doc file, pdf file, excel file).
So this ImageButton should open said file as you normally would. It works on debug, however when I publish my site, and run it from my localhost, it doesn't open the file. When I click the ImageButton it just does the postback and nothing happens.
The code for the ImageButton is just:
Process.Start(fileName);
fileName has the full path of the file I want to open, in this case it has: \serverNamefilesmyFile.pdf
View 11 Replies
Apr 9, 2010
How to solve Cross browser session Problem???When i login to my site and open a new tab,the session is shared.I want a new session for each tab.It is possible without using cookieless = 'true',but i cant use this.
View 4 Replies
Dec 7, 2010
Problem Statement: I have a details web page which has a unique sesssion ID generated per user. Now if a user does Ctrl + N or File > New Window and opens a new browser instance then the same session ID is genrated and user can update on both the windows differently and this leads to ambigous updates to DB. How can we stop user to open a new window or how can we detect that a new instance of the same session ID has been genrated twice so as to kill both the sessions with a user firiendly message.
View 1 Replies
Feb 7, 2011
any page that I open in my browser comes up blank.
I don't get any errors, it just comes up blank.
I also noticed that it seems to bypass forms authentication. For example, even though the page I open is blank, it is the actual page name that shows up in the browzer instead of the page that it usually redirects to for the forms authentication.
View 5 Replies
Oct 15, 2010
I have problem in my asp.net application. I have some file in floder (PDF, .doc, ,txt ) i want to open these files in my web browser .
Now my problem is large PDF files are not opeing in my browser even some less size pdf files are opeing prefectly and other files are also working good.
The following code i have wriiten to open the file
[Code]....
View 1 Replies
Aug 10, 2010
i trying to add some costume app into Dynamics CRM
basically i have an ASP.Net Page i show within an iframe inside the MS CRM.
when i try to do a submit using a button it opens a new window and shows the result there, i want it to stay in the iframe.
this is the ASP.Net code:
[code]....
View 1 Replies
Mar 5, 2013
How to prevent multiple browser windows opening in asp.net ...
View 1 Replies
Apr 22, 2010
I am using the below code
[Code]....
In the page there are two links. When i click the first link it opens a window in a new page. I do this by using the above code.
I am clicking the second link in the page and navigating to another page. Now i am clicking the browser back button. Supprisingly its opening the first link.
How clicking back button is opening the link in the page. I am using c# .net 2005.
View 1 Replies
Jan 19, 2011
I am using visual studio 2005 and 2008.when i Right click and select view in browser in VS 2005,it is opening same web page twice.Can any one say why it is opening twice.
View 8 Replies
Jan 17, 2011
In Visual Studio 2008 Express there is no folder browser to allow me to select a destination folder for downloading.
There is a FileUpload, but it requires a filename. I just want to select a folder only, and get its full path information.
In Windows API, there is a folder browser that I called in MS Access using VBA code.
Can someone supply me the code or tell me how to generate a folder browser to select a destination folder for downloading data to !! I would like it in VB.
I do have an .exe that generates a browser, but you can't run it on a website.
View 3 Replies