0

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 :(

2
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by hericles
0

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?

0

am using label to display the information ...

data1 and data2 refers to what ??

Edited by amm038: n/a

0

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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.