1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / url appending, custom module

url appending, custom module

4 posts, 0 answered
  1. Jesse
    Jesse avatar
    21 posts
    Registered:
    28 Nov 2007
    03 Jul 2008
    Link to this post
    I created a custom module that includes links to other items -- these items could be internal or external (with a bit field denoting such).  The issue is when you add said link (say, www.telerik.com or http://www.telerik.com) it gets appended to the host site link which of course, is a problem.  Resulting link comes out as such

    http://localhost/<projectName>/customModules/www.telerik.com

    How do you get around this or disable this? In the db, it is saved as
    "www.telerik.com"
  2. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    03 Jul 2008
    Link to this post
    i'm not sure if this is what you're asking about but i've found when linking to external sites you need to use the full address including the http://. if you want to link to other sites inside your sitefinity site, use them relative to the root, such as to link to yoursite.com/stuff/subpage/otherpage.aspx, link it as /stuff/subpage/otherpage.aspx.

    hope that this was helpful in some way.
  3. Vassil Daskalov
    Vassil Daskalov avatar
    261 posts
    Registered:
    18 May 2013
    04 Jul 2008
    Link to this post
    Hi Jesse,

    I think that Josh is poining you to the right direction. When you specify the protocol for the link, the HyperLink (or HtmlAnchor) control would not try to construct the link by concatenating the value to the current address.

    Regards,
    Vassil Daskalov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  4. Jesse
    Jesse avatar
    21 posts
    Registered:
    28 Nov 2007
    07 Jul 2008
    Link to this post
    HA!  ahhhh this is funny ...here's the link as it sits right now (stick with me on this)

    http://localhost:2506/<projectName>/en/%20http://www.google.com

    it helps when a <string>.Trim() is left alone -- it's no longer removing the spaces on save/updated/edit/etc because its been removed!  How nice, its a bug in my custom module.  Egh.

    Anyway, thanks for the help!
Register for webinar
4 posts, 0 answered