Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/87.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在aspx页面中包含html文件_Html_Asp.net - Fatal编程技术网

在aspx页面中包含html文件

在aspx页面中包含html文件,html,asp.net,Html,Asp.net,我有这个…,我在许多其他页面中使用它。 我们可以创建一个html文件并将其包含在aspx页面中,而不是重复此代码吗?如果是,怎么做 我没有使用Masterpage,我的后端是vb.net,而不是创建单独的html文件,您可以创建。如果您试图创建单独的html,则需要指定的所有标记,例如。 等 在用户控件中,您只需添加代码,如..在.aspx文件中包含普通html的替代方法是使用旧的asp include指令,如下所示: <!-- #include file="~/path/to/your-

我有这个
,我在许多其他页面中使用它。 我们可以创建一个
html
文件并将其包含在
aspx
页面中,而不是重复此代码吗?如果是,怎么做


我没有使用Masterpage,我的后端是vb.net,而不是创建单独的html文件,您可以创建。如果您试图创建单独的html,则需要指定的所有标记,例如。


在用户控件中,您只需添加代码,如
..

在.aspx文件中包含普通html的替代方法是使用旧的asp include指令,如下所示:

<!-- #include file="~/path/to/your-static-file.html" -->

这样,您就不需要像您所说的那样创建.net控件或母版页,只需包含您已有的文件即可