Working with heading elements

D

Dylan Parry

Hi,

I'm currently creating some ASPX pages, and I'd like to be able to
dynamically create the heading elements (H1-H6). I've been looking
through the available Types in C#, and so far I can't seem to find
anything that is *specific* to heading elements.

Is there any particular way I should do this, or is the generic
"System.Web.UI.HtmlControls.HtmlGenericControl" my best hope?

Cheers,

--
Dylan Parry
http://electricfreedom.org | http://webpageworkshop.co.uk

The opinions stated above are not necessarily representative of
those of my cats. All opinions expressed are entirely your own.
 
A

Alberto Poblacion

Dylan Parry said:
I'm currently creating some ASPX pages, and I'd like to be able to
dynamically create the heading elements (H1-H6). I've been looking
through the available Types in C#, and so far I can't seem to find
anything that is *specific* to heading elements.

Is there any particular way I should do this, or is the generic
"System.Web.UI.HtmlControls.HtmlGenericControl" my best hope?

It would be relatively simple to write your own server control for this
purpose, and in fact it is an excellent beginner exercise for learning how
to write a server control.
For inspiration, see this example:
http://msdn.microsoft.com/en-us/library/f820d25y.aspx
 

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

Top