[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to truncate information from database

Posted on 2006-11-24
2
Medium Priority
?
134 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 Türk
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 Türk earned 2000 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

864 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