Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET4.0
hi.
i wanna add a image to title of a aspx page in asp.net.
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
r.kh584
Rate this: bad
good
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 http://en.wikipedia.org/wiki/Favicon[^]
 
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.
 
Cheers
  Permalink  
Comments
Manas Bhardwaj at 5-Sep-12 7:37am
   
yup +5!
r.kh at 5-Sep-12 8:01am
   
thank
Rate this: bad
good
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" />
  Permalink  
Comments
Manas Bhardwaj at 5-Sep-12 7:38am
   
correct +5!
Rahul Rajat Singh at 5-Sep-12 7:40am
   
Thanks.
r.kh at 5-Sep-12 8:01am
   
thank
Debojyoti Saha at 17-Jan-13 6:11am
   
Hi
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
good
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.
  Permalink  
Comments
Manas Bhardwaj at 5-Sep-12 7:38am
   
yes +5!
Sandeep Mewara at 5-Sep-12 7:50am
   
Thanks Manas.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 5

Hi,
 
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,
http://favicon-generator.org/
 
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.
  Permalink  
Comments
CHill60 at 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 at 21-Jun-13 5:27am
   
Why two line code?? One line it's working>>

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



Advertise | Privacy | Mobile
Web03 | 2.8.1411022.1 | Last Updated 9 Jun 2013
Copyright © CodeProject, 1999-2014
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