< head runat =" server"> [英] <head runat="server">
问题描述
为什么我们需要runat =" server"在我们的< headtags?
Scott M.写道:
为什么我们需要runat =" server"在我们的< headtags?
这样头标记将被解析为服务器控件,以便
服务器代码可以访问它。
如果没有该属性,标签将被视为文字文本,
并且服务器代码无法在头标签内轻松添加标签。 br />
-
G?跑Andersson
_____
http://www.guffa.com
好吧,我明白runat =" ;服务器"一般意思是,但我们没有在bb中总是有这么多的b $ b服务器从来没有遇到过将标签添加到之前的头部的问题。具体来说,头标需要这个
?为什么服务器需要能够作为服务器访问head标签
对象?
" G?ran Andersson" < gu *** @ guffa.com写信息
新闻:ul ************** @ TK2MSFTNGP05.phx.gbl ...
Scott M.写道:
>为什么我们需要runat =" server"在我们的< headtags?
因此头标记将被解析为服务器控件,以便
服务器代码可以访问它。
如果没有该属性,标签将被视为文字文本,并且
服务器代码无法轻易在标签内添加标签。
>
-
G?跑Andersson
_____
http://www.guffa.com
Scott M.写道:
< blockquote class =post_quotes>
对不起,但你的回答似乎没有解释为什么需要这个
嗯,我试着解释一下,但如果你选择不相信我,你可以
只是......好吧......无论如何......
-
G?ran Andersson
_____
http://www.guffa.com
Why do we need runat="server" on our <headtags?
Scott M. wrote:Why do we need runat="server" on our <headtags?
So that the head tag will be parsed into a server control, so that the
server code can access it.
Without the attribute the tag would just be treated like literal text,
and the server code could not easily add tags inside the head tag.
--
G?ran Andersson
_____
http://www.guffa.com
Well, I understand what runat="server" means in general, but we haven''t
always had that in .NET and the server never had any trouble adding tags to
the head section before. What, specifically, does the head tag need this
for? Why does the server need to be able to access the head tag as a server
object?
"G?ran Andersson" <gu***@guffa.comwrote in message
news:ul**************@TK2MSFTNGP05.phx.gbl...Scott M. wrote:>Why do we need runat="server" on our <headtags?
So that the head tag will be parsed into a server control, so that the
server code can access it.
Without the attribute the tag would just be treated like literal text, and
the server code could not easily add tags inside the head tag.
--
G?ran Andersson
_____
http://www.guffa.com
Scott M. wrote:I''m sorry, but your responses don''t seem to reall explain why this is neededWell, I tried to explain, but if you choose not to believe me you can
just... well... whatever...
--
G?ran Andersson
_____
http://www.guffa.com
这篇关于< head runat =" server">的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!