如何在asp.net中添加图像到页面标题 [英] how to add a image to title of page in asp.net

查看:80
本文介绍了如何在asp.net中添加图像到页面标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨。

i想在asp.net中为aspx页面的标题添加图片。

所以我怎么能添加这个?



像这样:当加载codeproject时,一个小图像是页面标题的一面

解决方案

你好r,



你问的是如何设置图标。



更多信息在这里http://en.wikipedia.org/wiki/Favicon [ ^ ]



试试这个,在你的网站上把链接放在MasterPage中:



< link rel =快捷图标type =image / x-iconhref =〜/ favicon.ico/> 





此外,此类图标文件的大小应为16×16,32×32,48×48或64×64像素,8 -bit,24-bit或32-bit颜色深度。



干杯


听起来你在谈论添加一个图标在页眉中。



这里:将一个Favicon添加到您的ASP.Net页面 [ ^ ]



这叫做图标。 favicon是在大多数浏览器或选项卡上显示在地址栏左边缘的小图像。

在网站上添加图标非常简单。首先,您需要创建一个16 x 16像素的图标,并将其命名为favicon.ico。将您的favicon保存到ASP.Net Web应用程序的根目录。


它被称为favicon。您应该在显示favicon所需的页面上添加它。最好是在一些常见的地方,如主页或标题ascx / js(如果你使用的是旧方式而不是母版页)。



 < span class =code-keyword><   link     runat   =  server    rel   = 快捷方式图标    href   = 〜/ favicon.ico    type   =  image / x-icon  /  >  
< link runat = server rel = icon < span class =code-attribute> href = 〜/ favicon.ico type = image / ico / >


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"

解决方案

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


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.


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" />


这篇关于如何在asp.net中添加图像到页面标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆