如何在浏览器标签中显示我的网站名称而不是“无标题页面” [英] how to show my website name in browser tab instead of 'untitled page'

查看:676
本文介绍了如何在浏览器标签中显示我的网站名称而不是“无标题页面”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我运行我的项目,在浏览器选项卡中,我可以看到名称显示为无标题页面。

如何使我的项目名称显示在浏览器选项卡而不是'无标题页面'。

谢谢。

If I run my project, in the browser tab, I could see the name appearing as 'Untitled Page'.
How to make my project name to appear at browser tab instead of that 'untitled page'.
Thanks.

推荐答案

在< title>之间添加内容和< / title>在您的网页标题中!
Add something between <title> and </title> in the header of your web page!


当您使用母版页时,解决方案#1将无效。

您需要提供标题每个内容页面。



查看内容页面的第一行。

<![CDATA [ <%@ Page Title =关于语言=C#MasterPageFile =%>]]>





-KR
As you have used Master Page, the Solution #1 won't work.
You need to give the title on every content page.

See the very first line of your content page.
<![CDATA[<%@ Page Title= "About" Language="C#" MasterPageFile="" %>]]>


-KR


在ASP.Net MVC中设置Viewbag.Title。

例如

In ASP.Net MVC set the Viewbag.Title.
E.g.
<title>@ViewBag.Title</title>
@{
     ViewBag.Title = "Page";
}


这篇关于如何在浏览器标签中显示我的网站名称而不是“无标题页面”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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