Well, I found a solution that is not so elegant, but it works.
After several attempts to manage ParameterBindings properties, I thought about how to get the dynamic value there using the Location attribute.
The ParameterBinding Location attribute refers to where to get the value from. Articles such as the "Control ()" option hints. Therefore, changing the parameter binding to:
<ParameterBinding Name="HttpHost" Location="Control(MyHttpHost, Text)" DefaultValue="" />
and adding the following code to my page:
<asp:TextBox ID="MyHttpHost" runat="server" Visible="false" /> <script runat="server"> protected void Page_Load() { MyHttpHost.Text = SPContext.Current.Site.Url.Replace(SPContext.Current.Site.ServerRelativeUrl, ""); } </script>
... actually did the trick!
To get the parameter values ββfrom the accompanying XSL file, I put param elements in the root element. The parameter name attribute must match the ParameterBinding attribute:
<xsl:stylesheet ...> ... <xsl:param name="HttpHost"/>
Then the parameter can be referenced like any other XSL variable.
Peter Lillevold
source share