Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 2nd, 2004, 06:19 AM
Registered User
 
Join Date: Sep 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Change lines in a Table....

Hi,
i really really hope you all can help me out with this problem of mine. i have been trying it for such a long time and still couldn't get it right.

well, here's my problem..... i have my data stored in my SQL as text.
content of the data is really really long. and i want to display the data into a table. my problem is, even if i set the width of the table to a certain length the length of the table exceeds the length i have set.

what i wanted is, if the content reached the end say 300px of the table length, it automatically changes line and continues to display the data in the second line.

i am using literal in the code behind to make the table, here's the code,

literal.text += ("<table width = 300><tr><td width = 100%>")
literal.text += ( rs.fields("content").value & "</td></tr></table>"

i omitted the sql command here, the "content" has a very long data in it, and i need the table to automatically change line and not exceeds the given 300 px.

can anyone tell me how to do it ??

thanks in advanced...




 
Old October 2nd, 2004, 06:48 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi,

That should work. It works perfect for me here. What is the browser that you use?

Try this on a plain HTML file.
Code:
<html>
<head></head>

<body>
<table width = "300" border="0">
    <tr>
        <td width = "20%">
            ettssjdalsjdlasjd adslhasdjhajsdhjas daskdhasjkdhjkasdh askdhaskd kasjdh jaskhd askdh aksjhdk asdjhaskjdh 

kjdkahskdh kasdhkjashjkdh kajkjaskhkas dk as dkaskd askhdk askd hkjashkdj haskj dkjaskjdhkjasdkjahskjdhk
        </td>
        <td width = "80%">
            ettssjdalsjdlasjd adslhasdjhajsdhjas daskdhasjkdhjkasdh askdhaskd kasjdh jaskhd askdh aksjhdk asdjhaskjdh 
kjdkahskdh kasdhkjashjkdh kajkjaskhkas dk as dkaskd askhdk askd hkjashkdj haskj dkjaskjdhkjasdkjahskjdhk

            ettssjdalsjdlasjd adslhasdjhajsdhjas daskdhasjkdhjkasdh askdhaskd kasjdh jaskhd askdh aksjhdk asdjhaskjdh 
            <br><br>
kjdkahskdh kasdhkjashjkdh kajkjaskhkas dk as dkaskd askhdk askd hkjashkdj haskj dkjaskjdhkjasdkjahskjdhk
        </td>
    </tr>
</table>
</body>
</html>
And see if that works as expected. Else it is better you post the entire code.

Also I wrapped 300 and 100% within quotes, though that doesn't make any difference.

Cheers!

_________________________
- Vijay G
Strive for Perfection





Similar Threads
Thread Thread Starter Forum Replies Last Post
change table to dbo hepsy.i ASP.NET 1.0 and 1.1 Professional 1 August 7th, 2007 07:41 AM
Mark change in a table stealthdevil Access VBA 3 October 23rd, 2006 10:40 AM
change table structure Duncan SQL Server 2000 1 March 3rd, 2005 04:10 AM
How to delete two or more lines in a Table??? thomaz C# 3 July 4th, 2003 02:24 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.