Image in front of url in browser using asp.net
4 answers
You are talking about the badge. Not all browsers will recognize this, but most do. You can add a link tag inside the head section of the HTML page with a link to the icon file:
<link rel="SHORTCUT ICON" href="http://www.example.com/myicon.ico"/>
More information here: http://en.wikipedia.org/wiki/Favicon
+3
a source to share
Do you mean the badge?
Create a 16x16 pixel image and use this tool to convert it to an .ico file: http://tools.dynamicdrive.com/favicon/
Then put this line in a section <head>
:
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">
+2
a source to share
I do it like this in my asp.net page:
<link rel="shortcut icon" href="<%= ResolveUrl("~/Content/images/favicon.ico") %>"/>
Works in all major browsers including IE 7 and 8. Not tested 6. Note that this is similar to Ken's answer, but not fully qualified path is generated. The browser sees this:
<link rel="shortcut icon" href="/Content/images/favicon.ico"/>
+2
a source to share