• λ我爱Aspx >> Asp.Net >> 怎么让浏览器显示自己的html文档
  • 怎么让浏览器显示自己的html文档

  • :aspxer  Դ:csdn  :2007-7-6 2:50:58  ؼ:
  • 我尝试将自己的Html文档用Ie控件显示具体如下:((mshtml.HTMLDocumentClass)axWebBrowser1.Document).documentElement.innerText = sHtml;

    google_ad_width = 250; google_ad_height = 250; google_ad_format = "250x250_as"; google_color_url = "000000";

    可是程序报错如下:

    未将对象引用设置到对象的实例。

    请那位大虾帮忙该怎么写?

    第2楼. 由 intotheland 于 2007-7-1 14:07:13 发表

    可以用JavaScript代码打开一个新窗口,window.open(...),楼主说的不清楚.

    第3楼. 由 ratooner 于 2007-7-1 18:33:16 发表

    我是指在winform程序下使用axwebbrowser控件显示自己的html文件(也就是一个字符串)

    第4楼. 由 hongyelzg 于 2007-7-1 18:53:51 发表

    用文档模型可以实现,

    第5楼. 由 lxcnn 于 2007-7-1 18:59:50 发表

    先添加引用Microsoft.mshtml(mshtml.dll)

    private void button2_Click(object sender, EventArgs e)

    {

    object objUrl="about:blank";

    object NULL =null;

    this.axWebBrowser1.Navigate2(ref objUrl, ref NULL, ref NULL, ref NULL, ref NULL);

    }

    private void axWebBrowser1_DocumentComplete(object sender, AxSHDocVw.DWebBrowserEvents2_DocumentCompleteEvent e)

    Ҷƪл˵?
  • һƪvc#写的winform程序很占内存,如何解决
    һƪVB2005,如何搜索局域网上的SQL主机?