Opening different files from the browser
-
Hi, I am developing an application which needs to work with the files. In one page, i have a grid view which lists all the files used for my application, i have used hyperlink column in grid view for these filenames. If i click on the filename in the grid view, the file should be opened in the browser (i.e) it should not open the file in its original format (for example if it is a word document, it should not open in MS Word), it should open only in the browser. Files can be of any type - word, excel, ppts, jpegs etc. I have tried using Response.Redirect with full path, but that is not the result, which i am expecting. Can some body help me in this regard. Thanks in Advance Anuradha
-
Hi, I am developing an application which needs to work with the files. In one page, i have a grid view which lists all the files used for my application, i have used hyperlink column in grid view for these filenames. If i click on the filename in the grid view, the file should be opened in the browser (i.e) it should not open the file in its original format (for example if it is a word document, it should not open in MS Word), it should open only in the browser. Files can be of any type - word, excel, ppts, jpegs etc. I have tried using Response.Redirect with full path, but that is not the result, which i am expecting. Can some body help me in this regard. Thanks in Advance Anuradha
I don't think that it is possible. Because decision will be taken by the browser, and ASP.NET can't control it. Why do you need such an option ?
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions
-
I don't think that it is possible. Because decision will be taken by the browser, and ASP.NET can't control it. Why do you need such an option ?
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions
Atleast the basic formats like word, excel, power point, pdf docs should be supported, is there any mechanism to do this
-
Atleast the basic formats like word, excel, power point, pdf docs should be supported, is there any mechanism to do this
Anuradha612 wrote:
Atleast the basic formats like word, excel, power point, pdf docs should be supported, is there any mechanism to do this
AFAIK, NO. Operating system will be having file extension mappings, which maps file extension to applications which can read that. When a file is opened through browser, browser looks for this application mapping and loads it on the specified application. It is decided by the browser where to load the file, and how to show it. So you can't control it.
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions