Current filter:
                                You should refresh the page.
                                Support Center
                                0
                                  • LoginView control's AnonymousTemplate and LoggedInTemplate does not work when used inside the ASPxRoundPanel control.

                                    After some testing this condition is completely reproducible and consistent.

                                    When wrapping the ASPxRoundPanel control around ASP.Net's LoginView control, then the LoginView only shows what is in the AnonymousTemplate and never shows the content of the LoggedInTemplate even when the conditions are such that this template should be shown.

                                    This issue occurs when a UserControl is used. I have not tested the same directly on a page.

                                0

                                Hello Wolfgang:

                                We have already discussed a similar problem in one of our reports:

                                Asp LoginView doesn't work correctly in HeaderTemplate of ASPxRoundPanel

                                If a solution suggested in this report does not help, please reactivate this ticket.

                                Thanks
                                Kate.

                                0

                                Thanks.

                                Works.

                                For VB programers, I coverted the C# to VB:

                                Namespace FixedLoginView
                                    Public Class FixedLoginView
                                        Inherits LoginView

                                        Protected Overrides Sub OnPreRender(ByVal e As EventArgs)
                                            ChildControlsCreated = False
                                            MyBase.OnPreRender(e)
                                        End Sub
                                    End Class
                                End Namespace

                                The rest is the same.

                                0

                                Resolved.

                                0

                                Hello Wolfgang:

                                I am glad to hear that the issue is solved. If you have other issues, related to our controls, please feel free to post corresponding reports. Our team always do their best to help you.

                                Thanks
                                Kate.

                                0

                                I ran into other issues when using the FixedLoginView fix.

                                So I removed it and use the asp:MultiView control and test for logged in or out state in my code and switch to the appropriate view. See example:

                                [ASPX]
                                        <asp:MultiView ID="MultiView1" runat="server" OnInit="MultiView1_Init">
                                          <asp:View ID="viewAnonymous" runat="server">
                                            '---- Login and other controls as needed
                                          </asp:View>
                                          <asp:View ID="viewLoggedIn" runat="server">
                                              <br />
                                              You are logged in as
                                              <asp:LoginName ID="LoginName1" runat="server" />.<br />
                                              <br />
                                              <asp:LoginStatus ID="LoginStatus1" runat="server" LogoutAction="Redirect"
                                                    LogoutPageUrl="~/Default.aspx" />
                                          </asp:View>
                                        </asp:MultiView>

                                [VB]

                                    Public Sub MultiView1_Init(ByVal sender As Object, ByVal e As EventArgs)

                                        If HttpContext.Current.User.Identity.IsAuthenticated() Then
                                            MultiView1.SetActiveView(viewLoggedIn)
                                        Else
                                            MultiView1.SetActiveView(viewAnonymous)
                                        End If

                                    End Sub

                                This workaround resolved all the issues.

                                0

                                Hello Wolfgang:

                                I am glad to hear that the issue is solved. Thank you very much for publishing your solution. I'm sure that your experience will be very helpful for other users who experience a similar issue.

                                Thanks
                                Kate.

                                0

                                Pleasure:-)

                                Issue closed.

                                If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, Silverlight, ASP.NET, WinForms, HTML5 or Windows 8, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Copyright © 1998-2014 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners