473,320 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Adding large amounts of text to a readonly TextBox

What is the best way to add several pages of text to a readonly TextBox? The
text does not change and was created in a Word rtf document but could as
easly be put in a ASCII text file. Can this be done using a resource or
something? Can TextBoxes be attached to data sources other than database
objects?

Thanks,

Dennis
Nov 15 '05 #1
2 5086
Dennis,

You could put it into a resource, but ultimately, you have to get the
contents out of the resource into a string to add to the text. In order to
append large amounts of text, you will want to use the AppendText method on
the TextBox (or RichTextBox) class. It is meant to add large amounts of
text in an efficient manner.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Dennis C. Drumm" <de*******@primacode.com> wrote in message
news:OF****************@TK2MSFTNGP10.phx.gbl...
What is the best way to add several pages of text to a readonly TextBox? The text does not change and was created in a Word rtf document but could as
easly be put in a ASCII text file. Can this be done using a resource or
something? Can TextBoxes be attached to data sources other than database
objects?

Thanks,

Dennis

Nov 15 '05 #2
Nicholas:

I had remembered talking to someone who mentioned using resouces to hold
literals, etc.

Now maybe you could point me in the right direction on how to do that. Is
there something in the MSDN docs that explains how to do this and then how
to get the text out after?

Thanks,

Dennis

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:%2******************@TK2MSFTNGP12.phx.gbl...
Dennis,

You could put it into a resource, but ultimately, you have to get the
contents out of the resource into a string to add to the text. In order to append large amounts of text, you will want to use the AppendText method on the TextBox (or RichTextBox) class. It is meant to add large amounts of
text in an efficient manner.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Dennis C. Drumm" <de*******@primacode.com> wrote in message
news:OF****************@TK2MSFTNGP10.phx.gbl...
What is the best way to add several pages of text to a readonly TextBox?

The
text does not change and was created in a Word rtf document but could as
easly be put in a ASCII text file. Can this be done using a resource or
something? Can TextBoxes be attached to data sources other than database
objects?

Thanks,

Dennis


Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: michaaal | last post by:
If I use a form to pass data (say, for example, through a textbox) the data seems to be limited to somewhat smaller amounts. What should I do if I want to pass a large amount of data? For example...
58
by: Jon Glazer | last post by:
I have an anchor using a class that defines a hover subclass. The issue is that the anchor itself doesn't have any border and when hovered it adds a border, the problem is that when it adds the...
0
by: Elton W | last post by:
Hi Peter, You use DeleteButton.Attributes.Add("onclick", "return confirm ('Are you sure you want to delete?');"); in datagrid_ItemDataBound event to add confirmation for delete button.
1
by: DotNetJunkies User | last post by:
I'm trying create a single page app that allows the user to enter text (Serial) via a form and submit and populate that value into a datagrid via a datatable. It works for ONE value but each time...
5
by: Steven Smith | last post by:
Hi, I'm trying to write a simple program to print invoices for people I do work for. I've got a form with textboxes for descriptions and amounts for items, and some code for printing the...
0
by: landesjoe | last post by:
Hi, here's my problem in short: Text boxes in gridview don't seem to hold their value if the column's .Visible property is changed back and forth. I've got a form with a gridview populated from...
2
by: =?Utf-8?B?UHVjY2E=?= | last post by:
Hi, I'm using vs2005, .net 2 for a windows application. I have a richtextbox control on my form that I make it readonly. 1. Do I need to make readonly to be false to append text to it? 2. Even...
2
by: preeti13 | last post by:
Hi I have a readonly textbox i want to put the today date in there on th epage load but don't have any idea how to getthe dat inthere please help me here is my code: <%@ Page language="c#"...
6
by: =?Utf-8?B?Sm9obiBBdXN0aW4=?= | last post by:
I have an app that displays about 20 items of data in text boxes. Very occasionally I need to allow these to be used for data entry, but the bulk of the time they are solely for information. They...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.