如何更改页面标题? [英] How to change page title?

查看:69
本文介绍了如何更改页面标题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在项目中使用的是主页,我想更改内容页面的页面标题.我该怎么做?

i am using a master page in my project and i want to change the page title of content pages .how can i do it?

推荐答案

您好,浏览这些链接,您将得到答案

http://stackoverflow.com/questions/326628/asp-net-mvc-view-with-master-page-how-to-set-title [ http://odetocode.com/Articles/450.aspx [ http://haacked.com/archive/2009/04/03/tipjar-title-tags-and-master-pages.aspx [
Hi, browse these links, you will get the answer

http://stackoverflow.com/questions/326628/asp-net-mvc-view-with-master-page-how-to-set-title[^]

http://odetocode.com/Articles/450.aspx[^]

http://haacked.com/archive/2009/04/03/tipjar-title-tags-and-master-pages.aspx[^]

Thanks


在内容页面的@Page指令中,您可以对其进行更改.试试:
In @Page directive of your content page you can change it. Try like:
<![CDATA[<%@ Page Title="My Custom Title"%>]]>


您也可以通过内容页面的CS代码进行更改.试试这个:


And also you can change it through cs code of content page. Try this:

Page.Title = "My Custom Title";




--Amit




--Amit


this.Master.Page.Title =新标题";
this.Master.Page.Title = "New Title";


这篇关于如何更改页面标题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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