Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

optional WebURL paramater binding

$
0
0

Hello. I'm trying to figure out how I can make a DVWP with an optional WebURL parameter.

I want it so if the user provides it in the Parameters Editor then the DVWP will use it, otherwise it will use the current site. I thought I could use {sitecollectionroot} like below but that doesn't work on subsites so if the DVWP is in a sub-site page and the user doesn't provide a WebURL in Parameters Editor it will look for the list in the parent site because {sitecollectionroot} defaults to the parent site.

<WebPartPages:DataFormParameter Name="WebURL" ParameterKey="WebURL" PropertyName="ParameterValues" DefaultValue="{sitecollectionroot}" />


Viewing all articles
Browse latest Browse all 11571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>