Solved

How to truncate information from database

Posted on 2006-11-24
2
125 Views
Last Modified: 2010-04-25
I have a view page which displays a description field for each record in my database. Some of the description fields are too long and I want to cut them shorter on this page so that they only appear in full on the details page. Is there a way to cut off everything but the first 100 characters?

<td width="552">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<%=(rsrestaurants.Fields.Item("description").Value)%></td>
0
Comment
Question by:elliottbenzle
  • 2
2 Comments
 
LVL 17

Expert Comment

by:cem_turk
ID: 18009597
<td width="552">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<% document.write(Left(rsrestaurants.Fields.Item("description").Value,100))%></td>
0
 
LVL 17

Accepted Solution

by:
cem_turk earned 500 total points
ID: 18009608
oops mixed document.write with response.write :)

here you are

<td width="552">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<% response.write(Left(rsrestaurants.Fields.Item("description").Value,100))%></td>
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now