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. Loading 2048K values to textbox from stringbuilder object...

Loading 2048K values to textbox from stringbuilder object...

Scheduled Pinned Locked Moved C#
helpdesignbusinesstutorialquestion
8 Posts 2 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.
  • S Offline
    S Offline
    spalanivel
    wrote on last edited by
    #1

    Hi, I am trying to load the large values from the stringbuilder object to the textbox. The code below; static StringBuilder strCommandBuild = new StringBuilder (); // Business Logics here public string Commands { get { return strCommandBuild.ToString (); //txtRunCfg.Text ; } set { strCommands = value; } } // UI Part... where i am calling the strCommandBuild... txtRunCfg.Text = txtRunCfg.Text + objScript.Commands; The strCommandBuild has more than 2048K bits of datas(ie > 2048 * 1000). When it's loading in to textbox it hangs the application completely. How to solve this problem? Any help appreciated... Thanks.. How to load the values to textbox shown above. Reg, Subbu

    L S 3 Replies Last reply
    0
    • S spalanivel

      Hi, I am trying to load the large values from the stringbuilder object to the textbox. The code below; static StringBuilder strCommandBuild = new StringBuilder (); // Business Logics here public string Commands { get { return strCommandBuild.ToString (); //txtRunCfg.Text ; } set { strCommands = value; } } // UI Part... where i am calling the strCommandBuild... txtRunCfg.Text = txtRunCfg.Text + objScript.Commands; The strCommandBuild has more than 2048K bits of datas(ie > 2048 * 1000). When it's loading in to textbox it hangs the application completely. How to solve this problem? Any help appreciated... Thanks.. How to load the values to textbox shown above. Reg, Subbu

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      It doesn't make any sense. What do you want with a 2MB of character in a textbox ?

      S 1 Reply Last reply
      0
      • S spalanivel

        Hi, I am trying to load the large values from the stringbuilder object to the textbox. The code below; static StringBuilder strCommandBuild = new StringBuilder (); // Business Logics here public string Commands { get { return strCommandBuild.ToString (); //txtRunCfg.Text ; } set { strCommands = value; } } // UI Part... where i am calling the strCommandBuild... txtRunCfg.Text = txtRunCfg.Text + objScript.Commands; The strCommandBuild has more than 2048K bits of datas(ie > 2048 * 1000). When it's loading in to textbox it hangs the application completely. How to solve this problem? Any help appreciated... Thanks.. How to load the values to textbox shown above. Reg, Subbu

        S Offline
        S Offline
        spalanivel
        wrote on last edited by
        #3

        Hi, When I am executing the code it's throwing the error as; "Exception of type System.OutOfMemoryException was thrown" Reg, Subbu

        L 1 Reply Last reply
        0
        • S spalanivel

          Hi, When I am executing the code it's throwing the error as; "Exception of type System.OutOfMemoryException was thrown" Reg, Subbu

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Yes, that's an error of too much charachters...

          1 Reply Last reply
          0
          • S spalanivel

            Hi, I am trying to load the large values from the stringbuilder object to the textbox. The code below; static StringBuilder strCommandBuild = new StringBuilder (); // Business Logics here public string Commands { get { return strCommandBuild.ToString (); //txtRunCfg.Text ; } set { strCommands = value; } } // UI Part... where i am calling the strCommandBuild... txtRunCfg.Text = txtRunCfg.Text + objScript.Commands; The strCommandBuild has more than 2048K bits of datas(ie > 2048 * 1000). When it's loading in to textbox it hangs the application completely. How to solve this problem? Any help appreciated... Thanks.. How to load the values to textbox shown above. Reg, Subbu

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            Use RichTextBox

            S 1 Reply Last reply
            0
            • L Lost User

              It doesn't make any sense. What do you want with a 2MB of character in a textbox ?

              S Offline
              S Offline
              spalanivel
              wrote on last edited by
              #6

              Yes I want to load maximum size of 40 MB in a textbox. TextBox: Max length = 50,000,000 I am getting the values as string datatype and assigning to textbox...

              1 Reply Last reply
              0
              • L Lost User

                Use RichTextBox

                S Offline
                S Offline
                spalanivel
                wrote on last edited by
                #7

                Thanks a lot... I have used Richtextbox. Its working fine. But when I closed the application then it throws the same error as "Exception of type System.OutOfMemoryException was thrown". What need to rectify this error? Thanks, Subbu

                L 1 Reply Last reply
                0
                • S spalanivel

                  Thanks a lot... I have used Richtextbox. Its working fine. But when I closed the application then it throws the same error as "Exception of type System.OutOfMemoryException was thrown". What need to rectify this error? Thanks, Subbu

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #8

                  What are you doing during closing application ? I just tried 2048000 charachters in richtextbox and close the application, it's ok, no exception.

                  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