在母版页中设置标题 [英] Set title in master page

查看:84
本文介绍了在母版页中设置标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我如何在内容页面的主页面中设置标题,假设我没有在<页面中设置内容页面的标题属性br />
.aspx文件,而不是代码隐藏文件? (我问的原因是因为内容页面中的标题是动态的。)


谢谢,

Roshawn

Hi,

How do I set the title in a master page from a content page, assuming that I don''t set the content page''s title property in
the .aspx file but rather in the codebehind file? (The reason I ask is because the title in the content page is dynamic.)

Thanks,
Roshawn

推荐答案

" Roshawn" < ra ********* @ yahoo.comWrote in message

news:eM ************** @ TK2MSFTNGP02.phx.gbl。 ..
"Roshawn" <ra*********@yahoo.comwrote in message
news:eM**************@TK2MSFTNGP02.phx.gbl...

如何在内容页面中设置母版页中的标题
How do I set the title in a master page from a content page



标题。 Title =" ......";

Header.Title = "......";


这段代码怎么样?


Me.Master.Page .Title =" Whatever"


-

我希望这会有所帮助,

Steve C. Orr,
MCSD,MVP,CSM,ASPInsider
http://SteveOrr.net

Roshawn < ra ********* @ yahoo.comWrote in message

news:eM ************** @ TK2MSFTNGP02.phx.gbl。 ..
How about this code?

Me.Master.Page.Title = "Whatever"

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net
"Roshawn" <ra*********@yahoo.comwrote in message
news:eM**************@TK2MSFTNGP02.phx.gbl...




如何在内容页面的主页面中设置标题,假设

我没有在.aspx文件中设置内容页面的标题属性,而是在代码隐藏文件中设置了

? (我问的原因是因为

内容页面中的标题是动态的。)


谢谢,

Roshawn
Hi,

How do I set the title in a master page from a content page, assuming that
I don''t set the content page''s title property in the .aspx file but rather
in the codebehind file? (The reason I ask is because the title in the
content page is dynamic.)

Thanks,
Roshawn


感谢Steve的回复。不幸的是,这不起作用。 :-(
Thanks for the reply, Steve. Unfortunately, this doesn''t work. :-(


这篇关于在母版页中设置标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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