none
open HTML file in IE browser RRS feed

  • Question

  • hiii

    if i have an HTML file on a specific path .... how can i open it IE (internet explorer )

    using c# .. in windows forms

     

    Sunday, December 10, 2006 10:28 AM

Answers

  • Hi there,

    You can simply open any document by using a Proccess
    class (If the required application for opening has been installed).
    As you know we already have an IE installed in our windows for
    opening HTML documents

    So, you can use this :

    System.Diagnostics.Process p = new System.Diagnostics.Process();
    p.StartInfo.FileName =
    "test.html"; // Set your HTML file path
    p.Start();

    Your HTML file can be replace with *.doc, *.ppt , etc.
    then this code will open MS Word, MS PowerPoint , etc.
     

    ______________________________________
     May the god blessing be.

    LotraSoft Ltd.

    Sunday, December 10, 2006 10:43 AM
  • or a one liner....

    System.Diagnostics.Process.Start("file.html");

     

    Sunday, December 10, 2006 5:40 PM
    Moderator

All replies

  • Hi there,

    You can simply open any document by using a Proccess
    class (If the required application for opening has been installed).
    As you know we already have an IE installed in our windows for
    opening HTML documents

    So, you can use this :

    System.Diagnostics.Process p = new System.Diagnostics.Process();
    p.StartInfo.FileName =
    "test.html"; // Set your HTML file path
    p.Start();

    Your HTML file can be replace with *.doc, *.ppt , etc.
    then this code will open MS Word, MS PowerPoint , etc.
     

    ______________________________________
     May the god blessing be.

    LotraSoft Ltd.

    Sunday, December 10, 2006 10:43 AM
  • or a one liner....

    System.Diagnostics.Process.Start("file.html");

     

    Sunday, December 10, 2006 5:40 PM
    Moderator