HighDots Forums  

Text Preview in ASP

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Text Preview in ASP in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
_Mike
 
Posts: n/a

Default Text Preview in ASP - 11-03-2005 , 06:39 PM






What is the best way to display so many characters of text on a search results
page? Let's say 200 characters. If I add the dynamic text to my asp page for
the description it shows all the text in the database, but I want to limit the
text displayed from the recordsets dynamic text so users can preview the
description.

Example:

I search for german shepherd and on the results page I see:

German Shepherd
The first impression of a good German Shepherd Dog is that of a strong, agile,
well muscled animal, alert and full of life. It is well balanced...


Thanks.


Reply With Quote
  #2  
Old   
Nancy Gill
 
Posts: n/a

Default Re: Text Preview in ASP - 11-03-2005 , 07:19 PM






If you want say the first 200 characters of a field, you would have this in
the SQL of your recordset:

SELECT LEFT(fieldname,200) AS Description

and then use Description as the field you drop on the page where you want
the display.


--
Nancy Gill
Team Macromedia Member: Dreamweaver MX/UltraDev
http://www.macromedia.com/go/team/
Co-Author: Dreamweaver MX: Instant Troubleshooter (August, 2003)
Technical Editor: DMX 2004: The Complete Reference, DMX 2004: A Beginner's
Guide, Mastering Macromedia Contribute
Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP Web Development

"_Mike" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
What is the best way to display so many characters of text on a search
results
page? Let's say 200 characters. If I add the dynamic text to my asp page
for
the description it shows all the text in the database, but I want to limit
the
text displayed from the recordsets dynamic text so users can preview the
description.

Example:

I search for german shepherd and on the results page I see:

German Shepherd
The first impression of a good German Shepherd Dog is that of a strong,
agile,
well muscled animal, alert and full of life. It is well balanced...


Thanks.




Reply With Quote
  #3  
Old   
_Mike
 
Posts: n/a

Default Re: Text Preview in ASP - 11-03-2005 , 09:04 PM



That worked. Thanks for your help Nancy.

Mike

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.