creating HTML in code

  • Thread starter Thread starter PJ6
  • Start date Start date
P

PJ6

Are there classes built into the .NET framework that will help me assemble
HTML strings to create structures such as tables with content? Don't want to
re-invent the wheel. This is for custom control render output.

Paul
 
Are there classes built into the .NET framework that will help me
assemble HTML strings to create structures such as tables with
content? Don't want to re-invent the wheel. This is for custom control
render output.


Take a look at: System.Web.UI.HtmlControls

Or the Literal Control.
 
If you're looking to dynamically create tables, look into the HtmlTable
class in System.Web.UI.HtmlControls and the Table class in
System.Web.UI.WebControls.

If you want something other than tables, look in the two namespaces I
mentioned above for a close match. Chances are, you'll find what you need
there but if you can't find one, look into the HtmlGenericControl and
LiteralControl classes.

[LiteralControl is in System.Web.UI]

HTH
 

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

Back
Top