Formatting HTML

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Consider this code:

HtmlMeta meta = new HtmlMeta();
meta.Attributes.Add("description", "whatever, whatever, whatever");

HtmlHead head = (HtmlHead)Page.Header;
head.Controls.Add(meta );

That code writes a meta tag into the head element but it appends the meta
tag declaration to the end of other text located between the head elements.
How do we format the output of the meta tag text so it will begin on a new
line?

// what occurs
<link ... /><meta ... />

// what is desired
<link ... />
<meta... />
<meta... />


<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee.com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/


.



Relevant Pages

  • Formatting HTML
    ... That code writes a meta tag into the head element but it appends the meta ... tag declaration to the end of other text located between the head elements. ... How do we format the output of the meta tag text so it will begin on a new ...
    (microsoft.public.dotnet.languages.csharp)
  • get_meta_tags expects unique name values
    ... The function get_meta_tags reads a file or URL and returns an array, ... one element for each META tag in the HEAD element of the document. ... Faced with this HTML, get_meta_tags returns only the second, because ...
    (comp.lang.php)