Click here to Skip to main content
15,880,608 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
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
Updated 26-Aug-17 6:22am

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
 
Share this answer
 
Comments
Manas Bhardwaj 5-Sep-12 7:37am    
yup +5!
r.kh 5-Sep-12 8:01am    
thank
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.
 
Share this answer
 
Comments
Manas Bhardwaj 5-Sep-12 7:38am    
yes +5!
Sandeep Mewara 5-Sep-12 7:50am    
Thanks Manas.
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).

ASP.NET
<link runat="server" rel="shortcut icon" href="~/favicon.ico" type="image/x-icon"/>
<link runat="server" rel="icon" href="~/favicon.ico" type="image/ico" />
 
Share this answer
 
Comments
Manas Bhardwaj 5-Sep-12 7:38am    
correct +5!
Rahul Rajat Singh 5-Sep-12 7:40am    
Thanks.
r.kh 5-Sep-12 8:01am    
thank
Debojyoti Saha 17-Jan-13 6:11am    
HiRahul 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?

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900