Formatting HTML

C

clintonG

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/
 
C

clintonG

Thanks for bringing that up Sparky. I used to do so in ASP/VBS but I've
adopted C# and tried using \n\r which is the equivalent of vbCrLf but the
HtmlMeta method emits the HTML signature for the meta tag and I do not yet
know how to precede what is output or otherwise modify the output of the
HtmlMeta method.

<%= Clinton Gallagher
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top