?
Solved

Arraylist to textbox in web form

Posted on 2007-11-17
3
Medium Priority
?
769 Views
Last Modified: 2012-05-05
I am trying to figure out how to copy an arraylist to a textbox in a web form... I figured out how to do it with a windows form using textbox.AppendText in a foreach, but I cannot use AppendText in the web form...  thanks for the help!
0
Comment
Question by:brassmon
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 29

Accepted Solution

by:
Göran Andersson earned 2000 total points
ID: 20306616
Use a StringBuilder to create the string:
StringBuilder builder = new StringBuilder();
foreach (object o in theArrayList) {
   builder.AppendLine(o.ToString());
}
theTextBox.Text = builder.ToString();

Open in new window

0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20306620
something like this:

StringBuilder sb = new StringBuilder();
foreach (object o in yourList)
{
      sb.Append(o);
      sb.Append(" ");
}
textbox.Text = sb.ToString();
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20306624
Sorry, not refreshed...
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question