view a file on click of button

I want to view a file using default application on the click of a button, file to be viewed is specified in a textbox on the same form

Comments

  • : I want to view a file using default application on the click of a button, file to be viewed is specified in a textbox on the same form
    :


    Try this:

    System.Diagnostics.Process p = new Process();
    ProcessStartInfo ps = new ProcessStartInfo("c:\1.doc");
    p.StartInfo = ps;
    p.Start();

  • : : I want to view a file using default application on the click of a button, file to be viewed is specified in a textbox on the same form
    : :
    :
    :
    : Try this:
    :
    : System.Diagnostics.Process p = new Process();
    : ProcessStartInfo ps = new ProcessStartInfo("c:\1.doc");
    : p.StartInfo = ps;
    : p.Start();
    :
    :

    great..it works...thanks
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion