473,320 Members | 1,865 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.

How to Display data in textbox

14
Sorry For the previous post i send .I dont know i should not use short words.

I need help....

This coding works well...
Expand|Select|Wrap|Line Numbers
  1. While y.Read()
  2. Response.Write("Name i " & y("LastName"))
  3. Response.Write(y("Firstname"))
  4. Response.Write(y("id"))
  5. End While
  6. y.Close()
  7.  
I want get data from table and display the data

If there are three aaaa,Then all should be displayed.
Name:aaaa
ssss
1234

Name:aaaa
eeee
23456
Name:aaaa
dddd
3456

if use response.write it works well
I want to display it on the Textbox

I Set textbox mode as multiple line and write the following coding:

Expand|Select|Wrap|Line Numbers
  1. While y.Read()
  2. textbox9.Text = ("Name is " & y("Lastname") & y("id") & y("Firstname"))
  3. End While
its showing only one data like this ...
name:aaa
dddd
3456

how can i do it

can u please help me....

Thanks in advance..
Apr 19 '10 #1

✓ answered by tlhintoq


3 2200
liawcv
33
Use a temporary variable and perform string concatenation. This should get your problem solve. It is something similar to this:

Expand|Select|Wrap|Line Numbers
  1. Dim s As String = ""
  2. While y.Read()
  3.     s &= y("Lastname") & " " & y("id") & " " & y("Firstname") & vbCrLf
  4. End While
  5. y.Close()
  6. textbox9.Text = s
NOTE: String objects are immutable. Performing large amount of concatenations can degrade program's performance. For cases like this, using StringBuilder object would be a better choice.
Apr 20 '10 #3
yookify
14
@liawcv
Thank you.its very usefull for me
Apr 20 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: bala | last post by:
hi!!! i need to display a disclaimer which is two page in length in a word document. i also need to format the text. the idea is something as follows on opening the application, a form which...
4
by: Joe Van Meer | last post by:
Hi, Is the datalist meant for one table or can I use it to display information from 2 different tables? Or should I be looking at a datagrid instead? I began my code and kinda ran into a snag...
2
by: Reny J Joseph Thuthikattu | last post by:
Hi, I am reading the data which is coming from the serail port using my program.While displaying it i am facing some problem like whether to use text box or some thing else. I want to display the...
5
by: Stephen Noronha | last post by:
Hi all, I have a question, I have a restricted page (lots of data) and it really causes problems if i display all data, so I want to use a pop up to display the rest of the data, if i use a...
2
by: rn5a | last post by:
The different Validation controls like RequiredFieldValidator, RangeValidator etc. have a property named Display. This property can have 3 values - Dynamic, Static & None. What's the difference...
1
by: satish.vell | last post by:
Hi, I have a ASP.NET page inside which I toggle the display of a field using javascript. How can I save this display value between postbacks. Here is my code: <pre>
2
by: j.m.osterman | last post by:
I haven't found exactly what I've been trying to do. All I am trying to do for now is just display usernames from Active Directory into a ListBox control on a page. I have found some code...
3
by: sheenaa | last post by:
Hello friends, I m using ASP.NET with C# 2005 and SQL SERVER 2005 for the ASP.Net Website. I m using sqldatasource to connect and retrieve the data from database and then it displays the data...
12
by: =?Utf-8?B?anAybXNmdA==?= | last post by:
I want to plant an Easter Egg in our software. We have a TextBox that is multiline and used to display all sorts of messages on the screen for our operators based on database queries and such. ...
9
by: tshad | last post by:
I have a Windows App that is doing some work and then writing a "Now Processing..." line to the status line of the window as well as the Textbox on the form. But the problem is that the work is...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
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...
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...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.