[英]open HTML page from c#/asp.net
Is it possible from c#/asp.net to call/show a separeted html-page in the same window. 是否可以从c#/ asp.net在同一窗口中调用/显示一个分离的html页。
I don't want to store the entire html code into a , for exemple... (that works). 我不想将整个html代码存储到中,例如...(有效)。
Possible with javascript? 可能使用JavaScript? or do I have to modify the code-behind?
还是我必须修改后台代码?
The purpose is to load this html page everytime the default.aspx is invoked, as a webform(pop-up) 目的是每次调用default.aspx时都以webform(pop-up)加载此html页面。
You can Use iframe
to open your .html
page as: 您可以使用
iframe
通过以下方式打开.html
页面:
.aspx
Page: .aspx
页:
<iframe id="ifrm" runat="server"></iframe>
And on Page_Load
(code behind): 在
Page_Load
(后面的代码):
protected void Page_Load(object sender, EventArgs e)
{
ifrm.Attributes["src"] = "yourHtmlpageURL.html";
}
You can use it asp.net 您可以使用它asp.net
<iframe src="http://www.google.com"></iframe>
For c# application you can use WebBrowserControl. 对于c#应用程序,您可以使用WebBrowserControl。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.