Help with <pre> </pre>

  • Thread starter Thread starter Mark Sandfox
  • Start date Start date
M

Mark Sandfox

When I use the <pre> tag in the following i do get the advantage of the page
recognizing EOLN but the disadvantages are huge.



1) The text no longer wraps within a table/cell constraint

2) The last EOLN or EOF is forcing unwanted <br> or <p> and causing the
table to enlarge its height to include to many empty line at the bottom



Is there a solution for this?

My code as it stands now:

<div align="left">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse:
collapse" bordercolor="#111111" width="600">
<tr>
<td><pre><font face="Arial" Size="3"><%#
Container.DataItem("EventDescription")%></font></pre></td>
</tr>
</table>
</div>

Thank you in advnace for your help.
 
Basically, using the <pre> tag eliminate your text from being format by the
browser.

--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle,
MS KB Quick Links, etc.
==============================================
 
Is there a way to get the best of both worlds?

Thomas A. Rowe said:
Basically, using the <pre> tag eliminate your text from being format by the
browser.

--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle,
MS KB Quick Links, etc.
==============================================
 
Learn to program ASP.Net.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
If you are using the <pre> tag just to preserve carriage returns, then you
can drop them and use the following:

<%=replace(Container.DataItem("EventDescription"), vbcrlf, "<br>")%>


==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle,
MS KB Quick Links, etc.
==============================================
 
IT IS ASP.NET CODE THAT I AM TRYING TO WORK WITH.

AND REQUEST DOES NOT WORK WITH DATALIST.
 
I ahve tried this before and it returns "Name 'Container' is not declared."

This is within a datalist template and I can not seem to find a way to work
VB and ASP.NET code together (in this case) to be able to modify or compare
the contents of container.dataitem("AnyField"). I ahve already posted
request in ASP.NET to that effect and am not receiving any responses. If
you know the solution I would be deeply indebted.
 
I have tried the Request function but I get the follwoig error (Name
'Container' is not declared.
) because it resides within a datalist template. The objective here is to
simply replace any carraige retruns with <br>. The problem is I can not
seem to find the syntax to read the container.dataItem("anyField").
 
Mark,

Sorry, I can't help you then, as I don't work with ASP.net. However ASP.net
should have a similar "replace" type function.

--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle,
MS KB Quick Links, etc.
==============================================
 
It is an ASP.Net Page, generated using the FrontPage 2003 Database tools. To
make modifications to it, it would be necessary to modify the class
definition that FrontPage creates. The expression he is referring to is a
DataBinding expression, which must reference a function or property in his
class. As I don't use FrontPage to do ASP.Net, I can't explain how to modify
the class definition.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top