SiteExperts.com Logo Home | Community | Developer's Paradise
User Groups | Site Tools | Site Information | Search
 Main Menu
 Forums
SiteExperts.com Forums
All Discussions

SiteExperts Feedback
The Lounge
Dynamic HTML
Site Design/ Critiques
HTML and CSS
XML Technologies
The Wireless Internet
Internet Explorer
Microsoft .NET
The Server
Technical Support

Sponsored Links

User Groups : Forums : SiteExperts : The Server :

Previous DiscussionNext Discussion
 String Manipulation

I have a need to manipulate a string.

I currently receive a string thus - [CompanyName,ID]. I can create a listing showing a link to a profile page using the second field 'ID' as the link as shown here

-----------------------------------------------------------------------------------------------------------
For i = LBound(vData) To UBound(vData)
  Dim POSTstr
      POSTstr=Data
      POSTstr=Replace(POSTstr,",","  <a href=profile.asp?ID=")
      POSTstr=Replace(POSTstr,CHR(124),">Detail</a><br>")
   Response.Write POSTstr & ">Detail</a><br>"  
Next

-----------------------------------------------------------------------------------------------------------

My problem is that I am now in need of more detail and the string would read [Company,Contact,URL,ID]

Obviously I cannot use the same code as above as the Contact would be a hyperlink and the trailing two fields would be ignored. Any ideas how I would acheive this. Just to reiterate - I want to list the results with a hyperlink on the last field. If it helps it could be the first field??

Cheers -

Started By Jockrock on Aug 4, 2009 at 3:03:38 AM

5 Response(s) | Reply

View All Replies
Jockrock on Aug 4, 2009 at 9:48:24 AM

Thanks bod - I had tried that earlier and only now do I realise what an idiot I was. I was trying to Split() using javascript within ASP. Your reply prompted me to review and I didn't know whether to laugh or cry when I saw what I had done. I decided to laugh and go make dinner. Thanks again!


View All Replies

To respond to a discussion, you must first logon.

If you are not registered, please register yourself to become a member of the SiteExperts.community.

User Name
Password
Copyright 1997-2000 InsideDHTML.com, LLC. All rights reserved.