Open a html file using default web browser

前端 未结 4 872
执笔经年
执笔经年 2021-01-04 00:57

I\'m using this to get the path and executable of default web browser:

public static string DefaultWebBrowser
        {
            get
            {

               


        
4条回答
  •  执笔经年
    2021-01-04 01:18

    For those who don't have html default association to a browser, use

    System.Diagnostics.Process.Start("Chrome", Uri.EscapeDataString(pathToHtmlFile))

提交回复
热议问题