Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics 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 July 11th, 2006, 03:23 PM
Authorized User
 
Join Date: Aug 2003
Posts: 83
Thanks: 0
Thanked 0 Times in 0 Posts
Default href='dbValue' getting set to absolute reference

I'm creating a list of hyperlinks using info from my database:

Code:
listItemsDivInnerHtml &= "<a href='" & strLinkUrlIfRenderListsAsLinksEqualsTrue & "'>&raquo; " & reader("listItemName") & "</a>" & "<br />" & vbLf
the variable "strLinkUrlIfRenderListsAsLinksEqualsTrue" has a value of "../pages/personal/myPersonalPage.aspx?uid=34235". However when the <a> tag gets rendered, the href value gets the current pages path as a prefix to the value stored in the variable. How can I prohibit this from happening?

What I get:
<a href='http://www.mydom.com/website/condi/../pages/personal/myPersonalPage.aspx?uid=34235'>......

What I want"
<a href='../pages/personal/myPersonalPage.aspx?uid=34235'>.......





Similar Threads
Thread Thread Starter Forum Replies Last Post
Object reference not set flashmanTom BOOK: Beginning VB.NET Databases 1 February 19th, 2008 06:29 AM
How do I 'Set an obj reference using a variable? TomW Access VBA 1 October 30th, 2006 01:39 PM
chapter10: reference not set... JohnBoy BOOK: Beginning VB.NET Databases 2 May 1st, 2006 05:34 AM
Getting Error - "Object reference not set to an in peri C# 2 December 24th, 2004 11:20 AM
[NullReferenceException: Object reference not set creiche ASP.NET 1.0 and 1.1 Basics 3 September 23rd, 2003 08:38 AM





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