Wrox Programmer Forums
|
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional 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 November 8th, 2006, 01:51 PM
Authorized User
 
Join Date: Oct 2006
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Default changing the way a database stored value is output

 have html that is stored in a database for one part of a site..

so when <%=rsText("text")%> is written it writes to screen the html

when there is links in this html they show fine but i want to add something to the link... ie ?id=1

is there a way of doing this? I want to do it in the asp page as this will be used as a template and the id will change

so to clarify one part of the html stored in the database may have..

<a href="/content/test/File/red/Pontus/test.asp">test</a>

which will show test as a link

but i want to add in ?id=1 but not to the database code.

I explain with an example

i have three sites say

roger
sam
paul

roger has a siteid of 1, sam a siteid of 2 and paul of 3

and within the text stored in the database thier maybe three links

strText = "Hello there, please visit <a href=""/sites/roger/about/about.asp"">roger about</a> or <a href=""/sites/paul/products.asp"">sam product</a> or <a href=""http://www.jacintotrading.com"">jacintotrading</a> "


the first link will need a ?id=1 the second will need a ?id=3 and the last no ?id

does this make sense?

 
Old November 15th, 2006, 05:46 AM
Friend of Wrox
 
Join Date: Oct 2006
Posts: 114
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You could have a boolean to indicate external sites (http://etc.,) which you could test for.

SELECT CASE WHEN EXTERNAL_SITE THEN URL ELSE URL + '?id=' + SITE_ID END AS URL_ADDRESS .....

Regards,

Sean Anderson





Similar Threads
Thread Thread Starter Forum Replies Last Post
changing output for one node in XSLT shane_carty XSLT 3 February 27th, 2008 05:28 AM
Accessing Stored Procedure's output parameters. Gurudath BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 0 May 24th, 2007 07:00 AM
XML Output from stored procedure NigelBronson ASP.NET 2.0 Basics 0 October 15th, 2006 06:24 PM
How i can OUTPUT in Stored Proc yoord SQL Server 2000 2 July 19th, 2004 03:11 PM
problems with stored proc and output parameters zieg42 VB.NET 2002/2003 Basics 1 June 12th, 2004 07:11 AM





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