Click here to Skip to main content
15,908,115 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi all ,

I have a login menu item in my website and i want it to turn to profile when a user logs in and this is what iam doing :

XML
<asp:LoginView ID="LoginView2" runat="server">
                                    <RoleGroups>
                                        <asp:RoleGroup Roles="Members">
                                            <ContentTemplate>
                                                <a href="~/Members/CustomersList.aspx" id="A44" runat="server">
                                                    <img id="Img4" runat="server" alt="Profle" width="160" height="59" border="0" src="/images/profile.jpg"
                                                        onmouseover="this.src='/images/profile_hover.jpg'" onmouseout="this.src='/images/profile.jpg'" /></a>
                                            </ContentTemplate>
                                        </asp:RoleGroup>
                                        <asp:RoleGroup Roles="Anonymous">
                                            <ContentTemplate>
                                                <a href="~/Login.aspx" id="A15" runat="server">
                                                    <img id="Img4" runat="server" alt="Login" width="160" height="59" border="0" src="/images/Login.jpg"
                                                        onmouseover="this.src='/images/Login-hover.jpg'" onmouseout="this.src='/images/Login.jpg'" /></a>
                                            </ContentTemplate>
                                        </asp:RoleGroup>
                                    </RoleGroups>
                                </asp:LoginView>


But the login is not appearing .So what can i do ?

Please help.
Posted

1 solution

try this...

C#
if (Profile.UserName == "X" && User.Identity.IsAuthenticated)
{
}
 
Share this answer
 
Comments
Tech Code Freak 16-Aug-11 23:28pm    
Ma 5!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900