C# html table builder(tr3v.net)

published 2 years, 5 months ago, submitted by Tr3vTr3v(375) 2 years, 5 months ago

The purpose of this class is to simplify the generation of basic HTML tables.

7 comments |category: | Views: 507

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:

Comments:

posted by samdnpsamdnp(975) 2 years, 5 months ago 0

Hey, this look really neat--but I couldn't download it successfully. Could you shout when you fix it?

Reply

posted by Tr3vTr3v(375) 2 years, 5 months ago 0

The download option is now working, apologies for that!

Reply

posted by DamienGDamienG(1405) 2 years, 5 months ago 0

The built-in HtmlTable class in System.Web.HtmlControls can be used in a similar way.

[)amien

Reply

posted by aquinasaquinas(20) 2 years, 5 months ago 0

How about you change the functions so that they return the builder. Then you could do this:
TableBuilder tb = new TableBuilder();
tb.AddHeaderRow("Col 1", "Col2", "Col 3")
.AddRow("col 1", "col 2", "col 3")
.AddRow("col 1a", "col 2a", "col 3a");

Just a thought

Reply

posted by Tr3vTr3v(375) 2 years, 5 months ago 0

Unless I misunderstand you, does it not do that already?

Reply

posted by Tr3vTr3v(375) 2 years, 5 months ago 0

Sorry, after re-reading your post, I see what you mean! I didn't think of that when I built the class, the download is for the source so anyone can adapt it to suit their individual needs. If I get round to it i'll update it to do exactly that as it would be a useful addition. Thanks for the feedback.

Reply

posted by Tr3vTr3v(375) 2 years, 3 months ago 0

I've finally gotten around to adding that update, the AddHeaderRow and AddRow methods now return the builder so you can do .AddRow(...).AddRow(...); if you wish

Reply

information Login or create an account to comment on this story