G
Guest
I am using an asp.net table to display postings in a classifieds website.
This is a section of the HTM I am using...
<asp:table id="tblAdvert" Width="466px" Height="78px" runat="server"
BackColor="Gainsboro" BorderStyle="Solid" BorderWidth="1px"
BorderColor="MidnightBlue" GridLines="Both" CellSpacing="0">
<asp:TableRow>
<asp:TableCell></asp:TableCell>
</asp:TableRow>
...
<asp:TableRow>
And then I fill the table like this (in the code-behind) ...
tblAdvert.Rows(3).Cells(0).Text = advert.Description
The problem is that the text all gets displayed in one paragraph, even
though the user
might have added lines when they entered the posting.
So I tried this...
tblAdvert.Rows(3).Cells(0).Text = "<pre class=advertdescription>" &
advert.Description &
"</pre>"
This expands the table so that it stretches out, and the user has to scroll
horizontally
to see the whole posting.
Any suggestions ? Thanks,
Craig
This is a section of the HTM I am using...
<asp:table id="tblAdvert" Width="466px" Height="78px" runat="server"
BackColor="Gainsboro" BorderStyle="Solid" BorderWidth="1px"
BorderColor="MidnightBlue" GridLines="Both" CellSpacing="0">
<asp:TableRow>
<asp:TableCell></asp:TableCell>
</asp:TableRow>
...
<asp:TableRow>
And then I fill the table like this (in the code-behind) ...
tblAdvert.Rows(3).Cells(0).Text = advert.Description
The problem is that the text all gets displayed in one paragraph, even
though the user
might have added lines when they entered the posting.
So I tried this...
tblAdvert.Rows(3).Cells(0).Text = "<pre class=advertdescription>" &
advert.Description &
"</pre>"
This expands the table so that it stretches out, and the user has to scroll
horizontally
to see the whole posting.
Any suggestions ? Thanks,
Craig