Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. display (render) html in forms

display (render) html in forms

Scheduled Pinned Locked Moved C#
csharphtmlsysadminquestion
9 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jayapal Chandran
    wrote on last edited by
    #1

    Hi, I have a html code dynamically generated from my server and i want to display it in windows form. inside any control which could do that. I don't want to implement the full web browser control. 'cause i am not going to display a browser but just the html output. What could be the options in C#?

    Today's Beautiful Moments are Tomorrow's Beautiful Memories

    O realJSOPR 2 Replies Last reply
    0
    • J Jayapal Chandran

      Hi, I have a html code dynamically generated from my server and i want to display it in windows form. inside any control which could do that. I don't want to implement the full web browser control. 'cause i am not going to display a browser but just the html output. What could be the options in C#?

      Today's Beautiful Moments are Tomorrow's Beautiful Memories

      O Offline
      O Offline
      o m n i
      wrote on last edited by
      #2

      The WebBrowser control is the only reasonable way to do it.

      J 1 Reply Last reply
      0
      • O o m n i

        The WebBrowser control is the only reasonable way to do it.

        J Offline
        J Offline
        Jayapal Chandran
        wrote on last edited by
        #3

        Thanks. i included the webbrowser control and it is appearing well as expected by making this property false. webBrowser1.AllowWebBrowserDrop = False Now i have html code and i want to render that in the browser control instead of giving a url. This html code is dynamically generated by me from my local system. ? meanwhile i will try to find that out from msdn ....

        Today's Beautiful Moments are Tomorrow's Beautiful Memories

        L 1 Reply Last reply
        0
        • J Jayapal Chandran

          Thanks. i included the webbrowser control and it is appearing well as expected by making this property false. webBrowser1.AllowWebBrowserDrop = False Now i have html code and i want to render that in the browser control instead of giving a url. This html code is dynamically generated by me from my local system. ? meanwhile i will try to find that out from msdn ....

          Today's Beautiful Moments are Tomorrow's Beautiful Memories

          L Offline
          L Offline
          Luc Pattyn
          wrote on last edited by
          #4

          yep. read the MSDN documentation on WebBrowser, discover the DocumentText property, and don't forget to disable some interactions through other properties if you want it for output only. :)

          Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


          I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages


          modified on Sunday, December 20, 2009 3:17 PM

          J 1 Reply Last reply
          0
          • L Luc Pattyn

            yep. read the MSDN documentation on WebBrowser, discover the DocumentText property, and don't forget to disable some interactions through other properties if you want it for output only. :)

            Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


            I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages


            modified on Sunday, December 20, 2009 3:17 PM

            J Offline
            J Offline
            Jayapal Chandran
            wrote on last edited by
            #5

            Yes. Now i got it all into my program and it is working as expected. My program connects to a server script through socket, gets the response and render it as html. First i wrote it in C (WIN32 API) but displayed only as text. The size was 130kb and here it is just 20kb. I guess object codes were totally compiled into a final exe for sdk and with respect to C# it should be cause of the framework which reduces the size like visual basic 6.0. I am new to c# just a few days back i started this . so was this question from a novice.

            Today's Beautiful Moments are Tomorrow's Beautiful Memories

            L 1 Reply Last reply
            0
            • J Jayapal Chandran

              Yes. Now i got it all into my program and it is working as expected. My program connects to a server script through socket, gets the response and render it as html. First i wrote it in C (WIN32 API) but displayed only as text. The size was 130kb and here it is just 20kb. I guess object codes were totally compiled into a final exe for sdk and with respect to C# it should be cause of the framework which reduces the size like visual basic 6.0. I am new to c# just a few days back i started this . so was this question from a novice.

              Today's Beautiful Moments are Tomorrow's Beautiful Memories

              L Offline
              L Offline
              Luc Pattyn
              wrote on last edited by
              #6

              Very good. It seems you successfully skipped "Hello World" then. :)

              Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


              I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages


              J 1 Reply Last reply
              0
              • J Jayapal Chandran

                Hi, I have a html code dynamically generated from my server and i want to display it in windows form. inside any control which could do that. I don't want to implement the full web browser control. 'cause i am not going to display a browser but just the html output. What could be the options in C#?

                Today's Beautiful Moments are Tomorrow's Beautiful Memories

                realJSOPR Offline
                realJSOPR Offline
                realJSOP
                wrote on last edited by
                #7

                Check my Code Project Article Scraping article[^]. I render HTML in a form.

                .45 ACP - because shooting twice is just silly
                -----
                "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                -----
                "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

                J 1 Reply Last reply
                0
                • L Luc Pattyn

                  Very good. It seems you successfully skipped "Hello World" then. :)

                  Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


                  I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages


                  J Offline
                  J Offline
                  Jayapal Chandran
                  wrote on last edited by
                  #8

                  Hehe .. yes ... anyway thanks all for your replies. i have written a word reminder program and have published in my site which i want like wordweb.co.uk 's dictionary program.

                  Today's Beautiful Moments are Tomorrow's Beautiful Memories

                  1 Reply Last reply
                  0
                  • realJSOPR realJSOP

                    Check my Code Project Article Scraping article[^]. I render HTML in a form.

                    .45 ACP - because shooting twice is just silly
                    -----
                    "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                    -----
                    "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

                    J Offline
                    J Offline
                    Jayapal Chandran
                    wrote on last edited by
                    #9

                    ok. i will examine your code to get more info so that will add more ideas.

                    Today's Beautiful Moments are Tomorrow's Beautiful Memories

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups