Click here to Skip to main content
12,063,452 members (70,182 online)
Rate this:
Please Sign up or sign in to vote.
See more: ASP.NET4
i wanna add a image to title of a aspx page in
so how i can add this?

like this: "when codeproject is loaded a small image is side of page title"
Posted 5-Sep-12 1:58am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Hi r,

What you are asking is on how to set the favicon.

More info here[^]

Try this, in your site put the link in MasterPage:

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

Additionally, such icon files should be 16×16, 32×32, 48×48, or 64×64 pixels in size, and 8-bit, 24-bit, or 32-bit in color depth.

Manas Bhardwaj 5-Sep-12 7:37am
yup +5! 5-Sep-12 8:01am
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

Sounds like you are talking of adding an icon in the page header.

Here: Add a Favicon to your ASP.Net page[^]

It's called favicon. A favicon is the little image displayed at the left edge of the address bar in most browsers, or on the tab.
Adding a favicon to your website is very easy. First you need to create a 16 by 16 pixel icon and name it favicon.ico. Save your favicon to the root directory of your ASP.Net web application.
Manas Bhardwaj 5-Sep-12 7:38am
yes +5!
Sandeep Mewara 5-Sep-12 7:50am
Thanks Manas.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

It is called favicon. You should add this on the page you need to show the favicon. preferably in some common place like masterpage or header ascx/js(in case you are using old way instead of masterpage).

<link runat="server" rel="shortcut icon" href="~/favicon.ico" type="image/x-icon"/>
<link runat="server" rel="icon" href="~/favicon.ico" type="image/ico" />
Manas Bhardwaj 5-Sep-12 7:38am
correct +5!
Rahul Rajat Singh 5-Sep-12 7:40am
Thanks. 5-Sep-12 8:01am
Debojyoti Saha 17-Jan-13 6:11am
Rahul Rajat Singh, add a favicon icon to my website as you described. Firefox and chrome support the favicon but IE not support it.
so how can i show the icon in IE?
Rate this: bad
Please Sign up or sign in to vote.

Solution 5


Here is how you can add image to your title.

First convert ur logo or image to favicon.ico.
This can be done as follows:

1. Go to the link given below,

2. Choose ur image, convert it to .ico.

3. Download ur favicon.ico to your application directory.

4. Copy the below generated code to the head tag of ur page.

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

Thats it, this will display your title icon the way u want.
CHill60 10-Jun-13 9:47am
This question is over 6 months old and marked as solved. Your solution doesn't add anything that is not already in the other 4 solutions. It's great that you are trying to help, but answering old questions usually only gains you down-votes
tapasdass 21-Jun-13 5:27am
Why two line code?? One line it's working>>
Mohan_Patil 6-Jan-16 9:24am
Thanks.. The complete workflow of adding favicon.ico file

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web03 | 2.8.160204.4 | Last Updated 9 Jun 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100