locked
How to set relative URL for BDC action in SP2007 RRS feed

  • Question

  •  

    Hello.

    I've created BDC application and specified an action that navigates to our custom page. 

    <Action Position="1" IsOpenedInNewWindow="true" Url="/_layouts/Myfolder/MyPage.aspx">

    This action and URl works well when we use BDC on root site collection (when site collection url looks like http://<mashinename>:<portNumber>/)

    But when we create  site collection with URL like  http://<mashinename>:<portNumber>/sites/SiteCollectionName our BDC action URL is incorrect.

    Is there some way how to specify a relative URL for BDC action in SharePoint 2007 ?  Any help will be really appreciated.

    Thanks in advance.

     



    • Edited by SP2007_Beginner Monday, August 1, 2011 4:50 PM Corrected several typos in the message
    • Edited by Mike Walsh FIN Monday, August 8, 2011 3:46 PM SP comments removed. Off-topic
    Friday, July 29, 2011 5:08 PM

Answers

  • Hi ,

     

    You can implement  custom  VirtualPathProvider and assign it to the web application. VirtualPathProvider would then replace custom url  token with the needed string. Or you should provide the absolute url to navigate to the page .

     

    For detailed information ,please refer to this site:

    VirtualPathProvider Class: http://msdn.microsoft.com/en-us/library/system.web.hosting.virtualpathprovider.aspx

     

    Thanks,


    Entan Ming
    • Marked as answer by Emir Liu Monday, August 8, 2011 2:59 AM
    Tuesday, August 2, 2011 7:47 AM
    Moderator

All replies

  • I'm leaving in the off-topic SP 2010 information this time (mainly to avoid someone suggesting it as a solution) but please as far as possible keep these pre-SP 2010 forums free of any comments about how things work in SP 2010.

     

    Moderator pre-SP 2010 forums

    Later: removed the SP 2010 info after a reply came in


    SP 2010 "FAQ" (mainly useful links): http://wssv4faq.mindsharp.com/default.aspx
    WSS3/MOSS FAQ (FAQ and Links) http://wssv3faq.mindsharp.com/default.aspx
    Both also have links to extensive book lists and to (free) on-line chapters
    Friday, July 29, 2011 5:50 PM
  • Hi ,

     

    You can implement  custom  VirtualPathProvider and assign it to the web application. VirtualPathProvider would then replace custom url  token with the needed string. Or you should provide the absolute url to navigate to the page .

     

    For detailed information ,please refer to this site:

    VirtualPathProvider Class: http://msdn.microsoft.com/en-us/library/system.web.hosting.virtualpathprovider.aspx

     

    Thanks,


    Entan Ming
    • Marked as answer by Emir Liu Monday, August 8, 2011 2:59 AM
    Tuesday, August 2, 2011 7:47 AM
    Moderator