2

I am using asp.net with C# [3.5]. I want to display Image before my URL in browser, like IE and mozilla used to have. I want to display my custom image.

Please help. Thanks in advance

2

4 Answers 4

3

You're talking about a favicon. Not all browsers recognize it, but most do. You can add a link tag inside the head section of your HTML page with a link to the icon file:

<link rel="SHORTCUT ICON" href="http://www.example.com/myicon.ico"/>

More info here: http://en.wikipedia.org/wiki/Favicon

Sign up to request clarification or add additional context in comments.

3 Comments

It's forking in FF but not in IE, please help me how to display it in IE. Thanks a ton for your response.
IE doesn't look for it as often as FF does. Add the link to your favorites (in newer versions of IE this checks for the icon), or try a hard-refresh (Ctrl-F5).
I tried it with IE 8, but all in vain ! :( I don't know why Microsoft is not looking for the enhancement of IE, it's not less with CS3. Anyways, Thanks a lot for your help.
2

You mean a favicon?

Create a 16x16 pixel image and use this tool to convert it to an .ico file: http://tools.dynamicdrive.com/favicon/

Then place this line in your <head> section:

<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">

Comments

2

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. Haven't tested 6. Note that this is just like Ken's answer but a not-fully-qualified path is generated. The browser sees this:

<link rel="shortcut icon" href="/Content/images/favicon.ico"/>

Comments

0

do you mean a favicon?

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.