Bodoconsult.Web.Html 1.0.11

dotnet add package Bodoconsult.Web.Html --version 1.0.11
                    
NuGet\Install-Package Bodoconsult.Web.Html -Version 1.0.11
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Bodoconsult.Web.Html" Version="1.0.11" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Bodoconsult.Web.Html" Version="1.0.11" />
                    
Directory.Packages.props
<PackageReference Include="Bodoconsult.Web.Html" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Bodoconsult.Web.Html --version 1.0.11
                    
#r "nuget: Bodoconsult.Web.Html, 1.0.11"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Bodoconsult.Web.Html@1.0.11
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Bodoconsult.Web.Html&version=1.0.11
                    
Install as a Cake Addin
#tool nuget:?package=Bodoconsult.Web.Html&version=1.0.11
                    
Install as a Cake Tool

Bodoconsult.Web.Html

What does the library

The Bodoconsult.Web.Html library containes tools

How to use the library

The source code contain NUnit test classes, the following source code is extracted from. The samples below show the most helpful use cases for the library.

Create a simple HTML table

var table = new Table();
table.Attributes.Add("class","cssTableClass");

// Header
var headerrow = new TableRow(table);
headerrow.Attributes.Add("class","cssHeaderRowClass" );
ITableCell cell = new TableHeaderCell(headerrow) { Text = "Header1" };
cell.Attributes.Add("class", "cssHeaderCellClass" );
cell = new TableHeaderCell(headerrow) { Text = "Header2" };

// Content
var contentrow = new TableRow(table);
cell = new TableCell(contentrow) { Text = "Content1" };
cell.Attributes.Add("class", "cssContentCellClass" );
cell = new TableCell(contentrow) { Text = "Content2" };


// Act
var s = table.RenderIt();

Create an advanced HTML table

var styleSheet = new Stylesheet();
styleSheet.CssClassTable("cssTableClass");
styleSheet.CssClassTrHeader("cssHeaderRowClass");
styleSheet.CssClassTh("cssHeaderCellClass");
styleSheet.CssClassTrBody("cssBodyRowClass");
styleSheet.CssClassTd("cssContentCellClass");


// Arrange
var table = new Table {Stylesheet = styleSheet};

// Header
var headerrow = new TableRow(table);
ITableCell cell = new TableHeaderCell(headerrow) { Text = "Header1" };
cell = new TableHeaderCell(headerrow) { Text = "Header2" };

// Content
var contentrow = new TableRow(table);
cell = new TableCell(contentrow) { Text = "Content1" };
cell = new TableCell(contentrow) { Text = "Content2" };


// Act
var s = table.RenderIt();

## Create a HTML table from a System.Data.DataTable

var dt = TestHelper.GetDataTable("LineChart.xml");
var erg = TableFormatter.FormatAsHtml(dt, true);

MarkdownBuilder: create simple markdown files from code

[Test]
public void Save_ValidContent_FileSaved()
{
    var path = Path.Combine(Path.GetTempPath(), "test.md");

    if (File.Exists(path))
    {
        File.Delete(path);
    }

    Assert.That(File.Exists(path), Is.False);

    // Arrange 
    var builder = new MarkdownBuilder();
    const string content = "Test blubb blubb";

    // Act  
    builder.AddHeadline1("Headline 1");
    builder.AddParagraph(content);
    builder.AddRawMarkdown("## SubHeadline\r\n\r\nBlubb blabb blubb\r\n\r\n");
    builder.AddParagraph(content);
    builder.AddParagraph(content);

    builder.AddHeadline1("Headline 2");

    builder.AddParagraph(content);
    builder.AddParagraph(content);
    builder.AddParagraph(content);

    builder.Save(path);

    // Assert
    Assert.That(File.Exists(path));

    if (File.Exists(path))
    {
        File.Delete(path);
    }
}

About us

Bodoconsult (http://www.bodoconsult.de) is a Munich based software company from Germany.

Robert Leisner is senior software developer at Bodoconsult. See his profile on http://www.bodoconsult.de/Curriculum_vitae_Robert_Leisner.pdf.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.11 99 11/2/2026
1.0.10 86 11/2/2026

Test migration to .NET 8 and added README.MD