| Author: venkatesan 03 Nov 2009 | Member Level: Diamond | Rating:  Points: 2 |
you have to check the extension then pass the Content type
else use octetstream it will automatically open the specific file.
Regards, M.Venkatesan. Dot Net Code Snippets
|
| Author: Elz 03 Nov 2009 | Member Level: Gold | Rating:  Points: 2 |
Hi venkatesan,
Can you give me sample code?
|
| Author: Danasegarane.A 03 Nov 2009 | Member Level: Diamond | Rating:  Points: 2 |
This method will open the file with their default extension
System.Diagnostics.Process.Start("Filenamewithpath")
System.Diagnostics.Process.Start("D:\t.txt")
If it is a Notepad file it will be opened with Notepad by default If it is a Word File it will be opened with Winword
Please note that if there is no associated program then you will get error. You need to handle that also
Thanks and Regards, Danasegarane Arunachalam
|
| Author: Anuraj 03 Nov 2009 | Member Level: Diamond | Rating:  Points: 2 |
Try
Process.Start("Filename");
Thanks Anuraj THIS POSTING IS PROVIDED "AS IS" WITH NO WARRANTIES, AND CONFERS NO RIGHTS. BEWARE OF BUGS IN THE ABOVE CODE; I HAVE ONLY PROVED IT CORRECT, NOT TRIED IT. dotnetthoghts
|
| Author: Elz 03 Nov 2009 | Member Level: Gold | Rating:  Points: 2 |
Hi all
Thanks for the post
|