Question

I work with the Membership system in my project's masterpage and I'm trying to implement a LoginStatus control that will allow to loging/logout.

The control's login/logout link only works in internet explorer, but in firefox or chrome it's not clickable. is there anything I should add?

here is my control:

<asp:LoginStatus ID="LoginStatus1" runat="server" 
                                    LoginText="התחבר" 
                                    LogoutText="התנתק" 
                                    LogoutPageUrl="~/Login.aspx" 
                                    LogoutAction="Redirect"/>

EDIT

I tried to move the LoginStatus control to the footer and the link works. Probably just like Bartdude mentioned, it's a css problem. But I have no idea what is causing it. I'm sure you guys will know.

Here is my html part:

 <header>
            <div class="clearfix""></div>
            <div class="site_logo"><img src="assets/img/act_logo2.jpg" style="height:100px; width:200px;" />
                </div>
            <div class="clearfix"></div>
            <hr class="customHR" />
            <div class="TopNav">
                <div id="aspLoginStatus">
                    <asp:LoginName ID="LoginName1" runat="server" FormatString ="Welcome, {0}" />

                    <asp:LoginStatus ID="LoginStatus1" runat="server" 
                                    LoginText="התחבר" 
                                    LogoutText="התנתק" 
                                    LogoutPageUrl="~/Login.aspx" 
                                    LogoutAction="Redirect" 
                                     />


                </div>
                <ul>
                <li><a visible=false id="profile_link_master" runat="server">פרופיל אישי</a>
                    <ul>
                            <li><a visible=false id="profile_link" runat="server" onclick="redirect_to_profile()">פרופיל אישי</a></li>
                            <li><a visible=false id="layout_link" runat="server" onclick="redirect_to_layout()">עיצוב פרופיל</a></li>
                            <li><a visible=false id="search_profile_link" runat="server" onclick="redirect_to_search()">פרופיל חברי העמותה</a></li>
                    </ul>
                </li>
                    <li><a visible=false id="user_link" runat="server" href="create_user.aspx">ניהול משתמשים</a></li>
                    <li><a visible=false id="report_link" runat="server" href="report.aspx">דו"חות</a></li>


                    <li><a visible=false id="members_link" runat="server" href="#">חברי העמותה</a>
                        <ul>
                            <li><a visible=false id="search_link" runat="server" href="search_mem.aspx">חיפוש חבר</a></li>
                            <li><a visible=false id="mail_link" runat="server" href="e_mail.aspx">שלח מייל</a></li>
                            <li><a visible=false id="candidates_link" runat="server" href="Candidates.aspx">מועמדים ממתינים</a></li>

                        </ul>
                    </li>
                    <li><a id="join_link" runat="server" href="join_act.aspx">הצטרף לאקט</a></li>
                    <li><a id="info_link" runat="server" href="#">מידע שימושי</a>
                        <ul>
                            <li><a id="about_link" runat="server" href="web_site.aspx">אודות העמותה</a></li>
                            <li><a id="form_link" runat="server" href="forms.aspx">טפסים</a></li>
                            <li><a id="insurance_link" runat="server" href="insurance.aspx">ביטוחים</a></li>
                        </ul>
                    </li>
                    <li><a visible=false id="home_link" runat="server" href="events.aspx">דף הבית</a></li>
                </ul>
            </div>
        </header>

Here is the relevant css:

header {
    padding: 0px;
    margin: 0px;
   /* background-color: #D0D0D0; */
   moz-box-shadow: 1px 10px 10px #000000;
    -webkit-box-shadow: 1px 10px 10px #000000;
    box-shadow: 1px 10px 10px #000000; 
    height:100px;

    background-image: -ms-linear-gradient(top, #7D2BA6 0%, #000000 100%);
    background-image: -moz-linear-gradient(top, #7D2BA6 0%, #000000 100%); 
    background-image: -o-linear-gradient(top, #7D2BA6 0%, #000000 100%);
    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #7D2BA6), color-stop(1, #000000));
    background-image: -webkit-linear-gradient(top, #7D2BA6 0%, #000000 100%);
    background-image: linear-gradient(to bottom, #7D2BA6 0%, #000000 100%);
}

    header .site_logo {
        height: 100px;
        border: 1px solid #000;
        width: 200px;
        margin-top: 0px;
        margin-left: 20px;
        margin-bottom: 10px;
    }

    header .TopNav {
        display: block;
        background-color: #F0F0F0;
        vertical-align: middle;
        position: relative;
        font-family: "Comic Sans MS";
    }

        header .TopNav #aspLoginStatus {
            float:right;
            margin: 10px 10px 0 0;
            font-family: "Comic Sans MS";
            font-weight:bold;
        }
    header .TopNav, ul {
        padding: 0px;
        margin: 0px;
        position: relative;
        text-align:center;
    }

        header .TopNav ul li {
            padding: 10px;
            margin: 0px;
            list-style-type: none;
            display: inline-block;
            font-size: 110%;
            text-align:right;
        }

            header .TopNav ul li:hover > ul {
                display: block;
            }

            header .TopNav ul li ul { /* SubNav Styling */
                position: absolute;
                margin-top: 10px;
                min-width: 100px;
                max-width: 200px;
                background-color: #F0F0F0;
                display: none;
            }

                header .TopNav ul li ul li { /* SubNav Styling */
                    display: block;
                    padding: 5px 10px 5px 10px;
                }

                    header .TopNav ul li ul li a { /* SubNav Styling */
                        display: block;
                    }

            header .TopNav ul li a {
                text-decoration: none;
                color: #000;
                padding: 0px;
                margin: 0 5px 0 2px;
                font-weight: bold;
            }

                header .TopNav ul li a:hover {
                    color: #0FA2BC;
                }
Was it helpful?

Solution

I once had a similar issue I couldn't understand. Of course it's hard to tell with the info we have if you're having the same kind of issue but still...

My problem was actually linked to the HTML integration : the CSS was such that another element overlayed the link, while with a transparent background so you couldn't see it was over.

Another thing I would check is if there's no javascript error. As linkbuttons are basically triggering underlying javascript, it's possible a javascript error because of a IE-only code is preventing other browsers to work correctly.

One thing I'm quite sure is that you shouldn't look for the solution in your server-side code, as the difference seems to be on client side.

OTHER TIPS

Solved it by adding a z-index property, and so the control was above all css.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top