IT Community - Software Programming, Web Development and Technical Support

How to open a file with its default program

This is a discussion on How to open a file with its default program within the ASP and ASP.NET Programming forums, part of the Web Development category; hi, Using the file uplaod control i have stored a file in a specific path and i dont know to ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > ASP and ASP.NET Programming

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 03-03-2008, 09:49 PM
Manikandan.S Manikandan.S is offline
D-Web Trainee
 
Join Date: Feb 2008
Posts: 8
Manikandan.S is on a distinguished road
Smile How to open a file with its default program

hi,

Using the file uplaod control i have stored a file in a specific path and i dont know to open that file in there default program when clicking some button or link buttonso pls help me

thanks
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 03-10-2008, 03:18 AM
poornima poornima is offline
D-Web Sr.Programmer
 
Join Date: Dec 2007
Posts: 189
poornima is on a distinguished road
Smile Re: How to open a file with its default program

Hi,
Do u want to open the file and display the Content in the Textbox?
Plz tell this clearly...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 03-10-2008, 10:04 PM
poornima poornima is offline
D-Web Sr.Programmer
 
Join Date: Dec 2007
Posts: 189
poornima is on a distinguished road
Smile Re: How to open a file with its default program

hi,
Plz try this following coding,U can open the file with its default program.

For this include
using System.Diagnostics;->namespace

Process p = new Process();
ProcessStartInfo psi = new ProcessStartInfo("C:/Documents and Settings/Desktop/Changes1.txt");
psi.UseShellExecute=true;
psi.WindowStyle=ProcessWindowStyle.Normal;
p.StartInfo=psi;
p.Start();
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to Open a .pdf file on an AJAX enabled site? kingmaker ASP and ASP.NET Programming 0 08-25-2007 03:01 AM
how to open and retrive text file(.txt)? una_noche Java Server Pages (JSP) 1 08-17-2007 03:27 AM
when the program is executing,how to stop the program and open the cmd window... bluesky C# Programming 1 07-25-2007 05:51 AM
How do you open a file for writing? vadivelanvaidyanathan Perl 1 07-17-2007 03:25 AM
How to Open a HTML file inside Flash Balasubramanian.S Flash Actionscript Programming 8 03-28-2007 09:54 AM


All times are GMT -7. The time now is 07:37 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0