Groups | Blog | Home
all groups > asp.net > july 2003 >

asp.net : get head by tagname (from server control)


Steve C. Orr, MCSD
7/16/2003 2:22:25 PM
If you add the runat='server' attribute to the header tags then you can
access them from your code behind.
Here's more info and a good example using the Title tag:
http://www.aspalliance.com/kenc/faq5.aspx

Another option would be to turn the whole header section into a user
control. This gives you ultimate flexibility. Then you can output whatever
you want wherever you want within the header.

--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net


[quoted text, click to view]

Steve C. Orr, MCSD
7/16/2003 2:40:08 PM
Well then that boosts the second idea I mentioned, which is to make the
whole section a user (or custom) control. Then you can render whatever you
want.

--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net


[quoted text, click to view]

Peter Licen
7/16/2003 11:20:31 PM
my server control generates part of page from codebehind. I get other part
from different source.
how can i get <head></head> (written inline on .aspx) from the
ControlCollection(.aspx.vb)? For example - i would like to insert metatags.

it looks getting it by ID(which i don't have) is the only possibillity (i
don't want to override rendering )
any idea(getting it by TagName maybe)?

thnx

Peter Lièen
7/16/2003 11:37:52 PM
thnx, but the problem is that i don't write the inline tags. I get them and
i have first to analyze them and, if nessesary, correct them.
otherways, attribute id is the best choise(it has all support from
codebehind)

sorry for the direct replay

[quoted text, click to view]

AddThis Social Bookmark Button