Wrox Programmer Forums
BOOK: ASP.NET Website Programming Problem-Design-Solution
This is the forum to discuss the Wrox book ASP.NET Website Programming: Problem - Design - Solution, Visual Basic .NET Edition by Marco Bellinaso, Kevin Hoffman; ISBN: 9780764543869
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET Website Programming Problem-Design-Solution section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old January 4th, 2004, 11:02 PM
Registered User
Join Date: Nov 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default strings...

Is there a way that I can reduce the length of a string? I am getting a rather large text string into a label, but I only want first 50 characters to show with "..." following those 50 chars initially. e.g. "This is the string..." How can I do it?

What we do with information is... ART!
Old January 5th, 2004, 06:27 AM
Imar's Avatar
Wrox Author
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts

Hi there,

Take a look at the SubString() method of the String class. It has various overloads that allow you to determine the start and length of the substring. For example:

MyString = MyString.SubString(1, 50) & "..."

See here for more details: http://msdn.microsoft.com/library/de...tringtopic.asp



Imar Spaanjaars
Everyone is unique, except for me.

Similar Threads
Thread Thread Starter Forum Replies Last Post
strings RoniR VB.NET 2002/2003 Basics 1 May 4th, 2007 02:55 PM
strings bschleusner C# 2005 3 February 27th, 2007 11:46 PM
Strings ldoodle Classic ASP Basics 0 June 28th, 2005 09:26 AM
strings Moharo Pro PHP 2 May 17th, 2004 06:15 AM
strings slowhand SQL Server 2000 1 January 5th, 2004 12:20 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.