网站上有母版页,但 ASP.NET 源代码中没有母版页?
我获得了包含母版页的网站源代码,但源代码中不包含母版页。我尝试放置与我自己制作的相同的母版页并尝试在其上执行,但它不起作用。似乎已经有一些母版页,我可以在已发布的文件中看到它们,但在源代码中找不到。
I got source code of website which have included master pages but master pages are not included in source code. I have tried to put the same master page which i made myself and try to execute on it but it doesn't work. It seems there is already some master pages which i can see in published files but i cannot find in source.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您没有选择
允许此预编译站点可更新
,则母版页不会出现在您的源代码中,因为它们会作为.dll 编译到
文件。bin
文件夹中如果您打开任何 .aspx 文件,您将看到内容如下:
如果您需要能够在网站的已发布版本中编辑标记代码,请确保
允许此预编译网站可更新 发布时选择。
If you didnt select
Allow this precompiled site to be updatable
then Master Pages won't appear in your source code as they are compiled into thebin
folder as.dll
files.If you open up any .aspx file you will see that the content is just:
If you need to be able to edit the markup code in the published version of the site, ensure that
Allow this precompiled site to be updatable
is selected when publishing.