hi

i face w problem when displaying the information from the database

i store the information succefully but when i want to display the info

all info appear in one line

like i add this information
to the database.
my name is unkonwn

it appears like this
like i add this information to the database. my name is unkonwn

the information dont go to new line until it reach the limit of the table .

how i can solve this problem plz

am using asp with c#

and another question how can i add images to the news

like this

like i add this information
(image)
to the database
(another image)
my name is unkonwn
(another image)

plz help :(

Recommended Answers

All 3 Replies

You don't mention what control you are using to display the data but it sounds like you are outputting to a string, maybe a literal control. To make the data appear down the page (like a list) if you are placing string content on the page, you will just need to add a line break behind each piece of data.
E.g.

strData.Text = data1.ToString + "<br /> + data2.ToString + "<br />"

Is this what you are after?

am using label to display the information ...

data1 and data2 refers to what ??

They are just placeholders I used as I didn't know how you are extracting and storing the data before passing it to the label (dataTable, array, data reader, etc). Insert in there the data you are putting into the page.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.