1

就是这么多HRESULT E_FAIL,如果你知道我在说什么。

如果您使用 Visual Studio,您就会知道我在说什么。

类似的线程,但不是重复的:Visual Studio 中 aspx 页面的设计视图有用吗?

任何见解,包括来自 Microsoft MVP 的输入(哦,我知道你在那里)都会非常酷。

4

2 回答 2

3

可能有一些可能的原因。

第一种是如果您创建了一个 Web 表单 (aspx) 页面,将其与母版页嵌套;在子页面上,您注册了一个您开发页面的控件。

总之我想说。

您将子页面嵌套在母版页中,但在该子页面上您只注册了一些控件,没有其他任何内容。因此,您只能在该子页面上查看母版页。

您无法在控制器页面上看到母版页。

因为控制器页面只是部分页面,所以它们不会加载母版页。

母版页 <- 子页 <- 在子页上注册了一个控件

<%@ Register Src="Ctrl_AdminReports.ascx" TagName="Ctrl_AdminReports" TagPrefix="uc1" %>

您只能访问其直接子级的母版页控件。

于 2014-01-27T14:29:44.870 回答
-3

Try this: Put your MasterPages in a seperate folder (if they aren't already. Call it masterpages. Then add this to your web.config:

<location path="MasterPage">
<system.web>
  <authorization>
    <allow users="?" />
  </authorization>
</system.web>

This will allow anonymous access to that folder and allow access to the masterpage. Also, are these nested masterpages?

于 2010-07-19T19:02:39.887 回答