Image in front of url in browser using asp.net

I am using asp.net with C # [3.5]. I want to show an image up to my url in a browser like IE and mozilla. I want to display my own image.

Please, help. thanks in advance

+2


a source to share


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


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


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


Do you mean favicon ?

0


a source







All Articles