473,382 Members | 1,349 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

String manipulation

Hey

I want to only show the first 7 words of a string in an <asp:repeater>.

<asp:repeater>
<itemtemplate>
<%# DataBind.Eval(Container.DataItem, "bodytext");
</itemtemplate>
</asp:repeater>

Any tips as to the best way to do this?
Cheers
Chris
Nov 18 '05 #1
1 1049
Write a function to count spaces in a passed in string, and return the part
of the string before 7 spaces are counted. Then in your page simply pass the
bound item to the function.

Hope that helps,
--
--------------------------------------------------------
Peter Wright (www.petewright.org)
Author of ADO.NET Novice To Pro
From Apress. www.apress.com (and 10
other doorstops from Wrox)
"Chris" <ch***@no-spam.tuxweb.org> wrote in message
news:10*************@corp.supernews.com...
Hey

I want to only show the first 7 words of a string in an <asp:repeater>.

<asp:repeater>
<itemtemplate>
<%# DataBind.Eval(Container.DataItem, "bodytext");
</itemtemplate>
</asp:repeater>

Any tips as to the best way to do this?
Cheers
Chris

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: siddhartha mulpuru | last post by:
We have some rows that we need to do some tricky string manipulation on. We have a UserID column which has userid entries in the format firstname.lastname and i need to change each entry to...
9
by: mjakowlew | last post by:
Hi, I'm trying to use some string manipulation from a file's path. filepath='c:\documents\web\zope\file.ext' I need to extract everthing after the last '\' and save it. I've looked around...
4
by: Jim McGivney | last post by:
Does anyone know of a concise article that covers string manipulation, such as insert, join, pad, etc. Thanks, Jim
7
by: John A Grandy | last post by:
what are the preferred VB.NET analogues for IsNumeric() and Len() and CInt() & similar string-manipulation functions in VB6
4
by: WaterWalk | last post by:
Hello, I'm currently learning string manipulation. I'm curious about what is the favored way for string manipulation in C, expecially when strings contain non-ASCII characters. For example, if...
5
by: Cleverbum | last post by:
I'm not really accustomed to string manipulation and so I was wondering if any of you could be any help i speeding up this script intended to change the format of some saved log information into a...
5
by: Niyazi | last post by:
Hi, Does anyone knows any good code for string manipulation similar to RegularExpresion? I might get a value as string in a different format. Example: 20/02/2006 or 20,02,2006 or ...
3
by: crprajan | last post by:
String Manipulation: Given a string like “This is a string”, I want to remove all single characters( alphabets and numerals) like (a, b, 1, 2, .. ) . So the output of the string will be “This is...
3
by: frankeljw | last post by:
I have 2 Java strings 1st String is a series of names, colons, and numbers ie) Name1:13:Name2:4526:Name3:789:Name4:3729:Name5:6:Name6:44 2nd String is a name ie) Name2 I need to get the...
1
by: adam bob | last post by:
Hello, I'm struggling with an image mechanism I'm trying to build which basically manipulates a URL string. This is the sort URL that is gained from an InfoPath form ...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.