Sign in | Join
Last post 05-23-2008 8:54 AM by Sudheendra B. 6 replies.
Sort Posts: Oldest to newest Newest to oldest
Hello all forum members,
I am having a webpage. When i run that page the Favorite Icon is appearing in the Mozilla Browser. But it is no appearing in Internet Explorer. I dont know what is the problem.
I have written the code for Favorite icon as
<link rel="shortcut icon" href="images/iswfavicon.ico">
If any one has got the solution please suggest. Please provide the solution.
Thank you.
i'm not sure but some times it may take 72 hourse of IE to show the Favorite Icon
Hi Sudheendra
Try to add the "/" because our aspx pages are based on the XHTML standard
Hope this helps
<link rel="icon" href="/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
there is another way:
1.in your default.aspx add the following code:
<asp:placeholder id="FAVICON" runat="server"></asp:placeholder>
2.in the codebehind:
Private Sub ManageFavicon() ' read the ico from cache Dim strFavicon As String = CType(DataCache.GetCache("FAVICON" & PortalSettings.PortalId.ToString), String) If strFavicon = "" Then ' if exists If File.Exists(PortalSettings.HomeDirectoryMapPath & "favicon.ico") Then strFavicon = PortalSettings.HomeDirectory & "favicon.ico" If Not Common.Globals.PerformanceSetting = Common.Globals.PerformanceSettings.NoCaching Then ' write to cache DataCache.SetCache("FAVICON" & PortalSettings.PortalId.ToString, strFavicon) End If End If End If If strFavicon <> "" Then Dim objLink As HtmlGenericControl = New HtmlGenericControl("LINK") objLink.Attributes("rel") = "SHORTCUT ICON" objLink.Attributes("href") = strFavicon Dim ctlFavicon As Control = Me.FindControl("FAVICON") ctlFavicon.Controls.Add(objLink) End IfEnd Sub
From this article:
In Internet Explorer 5 and Internet Explorer 6, a shortcut icon does not appear on the address bar unless the user chooses to add the page as a favorite.
Hi,
thanks for the reply.
Hi blodfox777 ,
thanks for reply.