Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 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
  #1 (permalink)  
Old January 5th, 2008, 04:33 PM
Authorized User
 
Join Date: Jan 2007
Location: , , .
Posts: 72
Thanks: 0
Thanked 0 Times in 0 Posts
Default Base URLs - FCKeditor

Hi guys, hope everyone is well.

I've just moved my site onto the internet which has caused me a few problems concerning the urls of any documents/images added into the CMS whilst it was under development.

I added a resources facility into my site so that editors could add related "downloads" for an article. As the fileupload control appends the full base url to the filepath these resources along with the url's for category images failed to show as the base url had obviously changed

This was an easy fix as the data is presented using <asp:image> or <asp:hyperlink> controls meaning I could change the stored file name to "~/FileName.xxx"

This way it will always look into the root of the site.

However when adding images to an article the images are added using html <img> tags so "~/" does not work. If I add "/" to the start of the path then the images will show for visitors viewing the article but will not when editing the article (because the EditArticle page is in a directory higher).

Just wondered if anyone else had found this to be an issue and whether they had come up with a solution.

Thanks,

Retro


  #2 (permalink)  
Old January 8th, 2008, 08:06 AM
Friend of Wrox
 
Join Date: Aug 2006
Location: , , .
Posts: 142
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via MSN to vantoko
Default

is your admin directory a seperate virtual directory ?
if you use /images/yourimage.jpg it shouldn't matter from where you access it, no ?

  #3 (permalink)  
Old January 9th, 2008, 02:23 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Atlanta, Georgia, USA.
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You could try ResolveUrl on the server. I used this in my own site derived from ThePhile (first edition of this book). Your code should allow your site to run either as the virtual root, or as a virtual directory.

http://msdn2.microsoft.com/en-us/lib...esolveurl.aspx



Similar Threads
Thread Thread Starter Forum Replies Last Post
fckeditor bendjoe BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 September 15th, 2008 10:29 AM
FCKeditor chraas BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 February 25th, 2007 12:30 PM
Automatic URLs bodenzord Forum and Wrox.com Feedback 2 January 4th, 2005 04:19 PM
urls muhammadtahir4000 HTML Code Clinic 1 December 9th, 2004 04:41 AM
Complex URLs wells XSLT 3 June 16th, 2004 04:17 AM





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