I wish to put an image/icon beside the website address everytime a user visits my page. How can I do this in ASP.Net?

Recommended Answers

All 5 Replies

Create an image with .ico extention(you can create this by using visualstudio). Add this to your masterpage <link rel="SHORTCUT ICON" href="images/favico.ico" />

What if I didn't make use of a master page, where will i put the code? I tried inserting it right after the title tag of my default.aspx (this is the only place where I had seen that the code link rel is accepted), yet no icon appeared on the left of my site address. I inserted a .ico file in the images directory anyway.

i have tried it creating a new project and it worked without any problems. Is your default page in the root folder of your application? The href must be relative to your document. I can't think of any other problem for it not to work.

You need to put the link in the <head>, just like style sheets. And make sure it is relative to your document. (It works outside of it, but this depends on which browsers and versions too).

Internet explorer doesn't show icons very well. Preview it in Mozilla.

With or without master pages, this only means that since you don't have one, you will need to place this <link...> within every single page, or an included header page.

Thanks to all. The code is now working. It happened that there was a delay in the server where I uploaded my site.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.