< TITLE> [英] <TITLE>

查看:73
本文介绍了< TITLE>的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法操纵< TITLE中的csharp代码?

解决方案

" Steve B" < St **** @ discussion.microsoft.com写信息

news:59 ************************ ********** @ microsof t.com ...


有没有办法操纵< TITLE中的csharp代码?



"< TITLE>"什么?由于< TITLE>本身并不是有效的C#语法,你

必须使用它来引用别的东西。你指的是什么?


如果你在谈论表格标题栏中显示的文字,

那么你所要做的就是设定文本表单实例的属性。如果

你在谈论其他事情,你需要更具体地说明你要做什么




Pete




" Peter Duniho" < Np ********* @ NnOwSlPiAnMk.com在留言中写道

新闻:12 ************* @ corp.supernews.com .. 。


" Steve B" < St **** @ discussion.microsoft.com写信息

news:59 ************************ ********** @ microsof t.com ...


>有没有办法操纵< TITLE中的csharp代码?



"< TITLE>"什么?由于< TITLE>本身并不是有效的C#语法,

你必须使用它来引用别的东西。你在说什么?
引用?


如果你在谈论表格标题栏中显示的文字,

那么你所要做的就是设置文本。表单实例的属性。

如果你在谈论其他事情,你需要更具体地说明你想要做什么。


Pete



< TITLE是aspx中标题元素的html标记(或基本上是html)。

没有直接的方式从代码隐藏中访问title元素,

并且使用网络上提供的变通方法(例如

给出了标题id和runat属性)。你可以做什么(以及我们

做了什么)将服务器端脚本放在< titleblock中,例如

以下:

< title><%= this.PageTitle%>< / title>


您的页面内部(或您的网页继承的基类)是提供

服务器端脚本正在访问的PageTitle属性。


HTH,

Mythran


Mythran,

你能不能给我发一些关于如何做的样本C#代码?


有什么特别之处吗? 使用系统....我需要添加


感谢您的帮助。


" Mythran"写道:


>


" Peter Duniho" < Np ********* @ NnOwSlPiAnMk.com在留言中写道

新闻:12 ************* @ corp.supernews.com .. 。


" Steve B" < St **** @ discussion.microsoft.com写信息

news:59 ************************ ********** @ microsof t.com ...


有没有办法操纵< TITLE中的csharp代码?



"< TITLE>"什么?由于< TITLE>本身并不是有效的C#语法,

你必须使用它来引用别的东西。你在说什么?
引用?


如果你在谈论表格标题栏中显示的文字,

那么你所要做的就是设置文本。表单实例的属性。

如果你在谈论其他事情,你需要更具体地说明你想要做什么。


Pete



< TITLE是aspx中标题元素的html标记(或基本上是html)。

没有直接的方式从代码隐藏中访问title元素,

并且使用网络上提供的变通方法(例如

给出了标题id和runat属性)。你可以做什么(以及我们

做了什么)将服务器端脚本放在< titleblock中,例如

以下:

< title><%= this.PageTitle%>< / title>


您的页面内部(或您的网页继承的基类)是提供

服务器端脚本正在访问的PageTitle属性。


HTH,

Mythran


Is there a way to manipulate the <TITLEin the csharp code?

解决方案

"Steve B" <St****@discussions.microsoft.comwrote in message
news:59**********************************@microsof t.com...

Is there a way to manipulate the <TITLEin the csharp code?

The "<TITLE>" of what? Since "<TITLE>" by itself isn''t valid C# syntax, you
must be using that to refer to something else. To what are you referring?

If you are talking about the text displayed in the title bar of the form,
then all you have to do is set the "Text" property of the form instance. If
you''re talking about something else, you need to be more specific about what
it is you want to do.

Pete




"Peter Duniho" <Np*********@NnOwSlPiAnMk.comwrote in message
news:12*************@corp.supernews.com...

"Steve B" <St****@discussions.microsoft.comwrote in message
news:59**********************************@microsof t.com...

>Is there a way to manipulate the <TITLEin the csharp code?


The "<TITLE>" of what? Since "<TITLE>" by itself isn''t valid C# syntax,
you must be using that to refer to something else. To what are you
referring?

If you are talking about the text displayed in the title bar of the form,
then all you have to do is set the "Text" property of the form instance.
If you''re talking about something else, you need to be more specific about
what it is you want to do.

Pete

<TITLEis html markup for the title element in aspx (or basically, html).
There is no direct way of accessing the title element from the code-behind,
and was kinda buggy using the workarounds provided on the net (such as
giving the Title id and runat attributes). What you can do (and what we
have done) is put server side script inside the <titleblock, such as the
following:

<title><%=this.PageTitle%></title>

Inside your page (or base classes that your page inherits from) is provide
the PageTitle property that the server-side script is accessing.

HTH,
Mythran


Mythran,
Can you also send me some sample C# code on how to do this?

Are there any special "using System...." I need to add

Thanks for your help.

"Mythran" wrote:

>

"Peter Duniho" <Np*********@NnOwSlPiAnMk.comwrote in message
news:12*************@corp.supernews.com...

"Steve B" <St****@discussions.microsoft.comwrote in message
news:59**********************************@microsof t.com...

Is there a way to manipulate the <TITLEin the csharp code?

The "<TITLE>" of what? Since "<TITLE>" by itself isn''t valid C# syntax,
you must be using that to refer to something else. To what are you
referring?

If you are talking about the text displayed in the title bar of the form,
then all you have to do is set the "Text" property of the form instance.
If you''re talking about something else, you need to be more specific about
what it is you want to do.

Pete


<TITLEis html markup for the title element in aspx (or basically, html).
There is no direct way of accessing the title element from the code-behind,
and was kinda buggy using the workarounds provided on the net (such as
giving the Title id and runat attributes). What you can do (and what we
have done) is put server side script inside the <titleblock, such as the
following:

<title><%=this.PageTitle%></title>

Inside your page (or base classes that your page inherits from) is provide
the PageTitle property that the server-side script is accessing.

HTH,
Mythran


这篇关于&LT; TITLE&GT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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