ASP 登录控件在 Sitecore 6 子布局中不起作用

发布于 2024-08-08 02:56:00 字数 417 浏览 4 评论 0原文

在 Sitecore 6 中,我创建了一个具有 asp:login 控件的子布局。由于某种原因,当我将其添加到页面布局时它不起作用。该页面只是回发,但不让我登录。

我制作了一个带有登录控件的独立 .aspx,它工作正常。所以问题不在于会员制度。我的猜测是它与页面生命周期和事件顺序有关。也许登录控件没有及时添加到页面来处理正确的事件和数据?

有谁知道为什么登录控件在添加为子布局时不起作用?有谁知道解决办法吗?

更新 我将事件处理程序连接到控件事件,但出于某种原因,它们从未被调用。该控件的 onload 方法确实被调用,但 LoggingIn 和 Authenticate 事件永远不会触发。这仍然可能是由于我的包装器控件没有及时添加到页面。然而,我认为他们有其他控件可以做类似的事情,所以我仍然不确定我在做什么不同/错误......

In Sitecore 6, I have created a sublayout that has an asp:login control. For some reason, it doesn't work when I add it to the layout of a page. The page simply posts back, but doesn't log me in.

I made a stand alone .aspx with a login control and it works fine. So the problem is not with the membership system. My guess is it has something to do with the page life cycle and event ordering. Maybe the login control is not getting added to the page in time to handle the correct events and data?

Does anyone know why the login control would not work when added as a sublayout? Does anyone know a work around?

UPDATE
I hooked up event handlers to the controls events, and for whatever reason, they never get called. The control's onload method does get called, but the LoggingIn and Authenticate events never fire. This could still be due to my wrapper control not being added to the page in time. However, I think that they have other controls that do similar things, so I'm still not sure what I'm doing differently/wrong...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

零度° 2024-08-15 02:56:00

尝试将登录控件定义添加到 web.config 中的 typesThatShouldNotBeExpanded 列表中:

<rendering>
    <typesThatShouldNotBeExpanded>
        <type>System.Web.UI.WebControls.Repeater</type>
        <type>System.Web.UI.WebControls.DataList</type>
    </typesThatShouldNotBeExpanded>
</rendering>

Try adding the login control definition to the typesThatShouldNotBeExpanded list in web.config:

<rendering>
    <typesThatShouldNotBeExpanded>
        <type>System.Web.UI.WebControls.Repeater</type>
        <type>System.Web.UI.WebControls.DataList</type>
    </typesThatShouldNotBeExpanded>
</rendering>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文