Home
Options

Send HTML to browser from LINQPad?

edited September 2012
I often use LINQPad to prototype code that generates HTML. The downside is that I have to copy and paste the generated HTML into notepad, save the file, and then open the file in a browser.

I wish there is a way to send the HTML, generated in LINQPad, directly to a browser. Or perhaps there is a way to display rendered HTML directly in LINQPad.

Steve

Comments

  • Options
    I found the Util.RawHtml method, which does what I am looking.

    With C# I can use the following statement:

    Util.RawHtml(body).Dump();

    The body variable is a string.

    However I can't get it to work w/ VB.NET. If I run this statement:

    Util.RawHtml(body).Dump()

    I get this error:

    MissingMemberException: Public member 'Dump' on type 'RawHtml' not found.

    Does Util.RawHtml work in VB? I am mostly a C# coder, but have to maintain VB.NET code as well.

    Steve
  • Options
    try

    Console.WriteLine( Util.RawHtml(body) )

    or

    Dim wb as new System.Windows.Forms.WebBrowser()
    wb.DocumentText = body
    wb.Dump()
Sign In or Register to comment.