can .net access HTML tag contents and modify them?

  • Thread starter Thread starter darrel
  • Start date Start date
D

darrel

This is maybe a blue-sky wish, but I have to ask...

Can .net access/modify the contents of an HTML tag on the page?

For instance, in XML, one can grab and set the properties for a tag. In
..net, one can grab and set the properties of a webcontrol tag.

What I was specifically wondering is if I could modify the contents of the
TITLE tag from the codebehind using a method like this. (I know there are
plenty of other ways to write out the TITLE tag dynamically via .net, but I
was just curious if it can be done to a static TITLE tag from the
codebehind.)

To get VERY specific, in pseudo code, I was wondering if one could do
something like this:

if page is a post back and page is not valid then
grab the contents of the TITLE tag
write out new contents as "ERROR:" & contents of original TITLE tag
end if

-Darrel
 
throw a "runat=server" on it and declare it in the codebehind and you should
be able to
 
Back
Top