Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/35.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ionic-framework/2.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
C# 从asp.net读取html文件_C#_Asp.net - Fatal编程技术网

C# 从asp.net读取html文件

C# 从asp.net读取html文件,c#,asp.net,C#,Asp.net,我想在asp.net中读取html文件和ascx文件中的加载控制。我在net中搜索,但找不到任何资源。请提供链接或任何解决方案。谢谢。我使用asp直接生成html,如果您有html文件,您可能希望将其另存为.aspx,但使用此行调用您的ascx页面: <%@CodeFile="nameFile.aspx.cs" Inherits="Pages_features" %> 我总是把这个放在书页的顶端。希望这有帮助(而且我做对了,因为VisualStudio通常为我做!)一次性?或者

我想在asp.net中读取
html
文件和
ascx
文件中的加载控制。我在net中搜索,但找不到任何资源。请提供链接或任何解决方案。谢谢。

我使用asp直接生成html,如果您有html文件,您可能希望将其另存为.aspx,但使用此行调用您的ascx页面:

<%@CodeFile="nameFile.aspx.cs" Inherits="Pages_features" %>


我总是把这个放在书页的顶端。希望这有帮助(而且我做对了,因为VisualStudio通常为我做!)

一次性?或者这是一个改变了的HTML文件,你想继续动态地阅读它吗?问题不太清楚。是否要读取现有html文件,然后加载自定义控件
ascx
?如果你有一些代码,请尝试在这里显示。是的,我想阅读现有的html文件并在ascx中编写,并且在每个文件之间包含ContainPlaceHolder。这是我的要求,我对此一无所知。你能显示ascx吗?或者至少你想把html放在哪里?在占位符中?您也知道如何读取该文件吗?但我有一个由用户生成的多页html文件,我想选择其中一个并作为用户选择写入ascx文件,并且在每个文件之间包含CONTAINSPLACEHOLDER。