<asp:LoginView ID="LoginView2" runat="server"> <anonymoustemplate> <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'" önmouseout="this.src='images/Login.jpg'" /> </anonymoustemplate> <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'" önmouseout="this.src='/images/profile.jpg'" /> </contenttemplate> </rolegroups>
If TryCast(ctrl, LoginView) IsNot Nothing Then If HttpContext.Current.User.Identity.IsAuthenticated = False Then Dim a As New HtmlControls.HtmlAnchor a = ctrl.FindControl("A15") If a.HRef.ToUpper = Item.ToUpper Then For Each imag As HtmlControls.HtmlImage In a.Controls If TryCast(imag, HtmlControls.HtmlImage) IsNot Nothing Then DirectCast(imag, HtmlControls.HtmlImage).Attributes.Add("onMouseOver", "") DirectCast(imag, HtmlControls.HtmlImage).Attributes.Add("onMouseOut", "") DirectCast(imag, HtmlControls.HtmlImage).Src = "~/images/login-hover.jpg" End If Next End If End If End If
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)