Bytes Expert Newtork: Connect with experts in IT / Business | Expert Topics



Search


Go Back   Programmers Resource > Code Section > ASP Tips & Code Snippets
User Name
Password


 
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 06-05-2003, 02:13 PM
admin admin is offline
Administrator
 
Join Date: May 2003
Posts: 116
Limiting Text in Query Results

Simple Way of limiting the amount of text shown from dbase results just replace the 10's with the amount of charactors you wish to limit.

Code:
<% 'Define Topic Topic = rs("topic") 'Limit amount of Characters to show Topic = left(topic,10) 'iF 10 Characters is not Null then show first 10 with ... after the first 10 if mid(topic,10) <> "" then Topic = left(topic,10) & "..." end if 'display results of topic response.write("topic") %>


or simply

Code:
<%=("topic")%>


By Willie

Last edited by admin : 08-05-2004 at 02:39 AM.
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Forum Jump



All times are GMT -5. The time now is 06:49 AM.



Powered by: vBulletin Version 3.0.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
All content Copyright ©1999 - 2010, Programmers Resource, unless otherwise noted.