How to embbed xslt/razor function in usercontrol (ascx)

Oct 1, 2012 at 7:26 PM
Edited Oct 1, 2012 at 7:26 PM

I use this code in my usercontrol, I want to load function AddThis but it don't work

<f:function name="Composite.Community.AddThis" xmlns:f="http://www.composite.net/ns/function/1.0">

<f:param name="Style" value="SmallButtons" />

<f:param name="ProfileId" value="xa-500e264003e16f55" />

</f:function>

Oct 1, 2012 at 9:42 PM

add runat="server" and remove xmlns:f and you should be good to go.

Oct 2, 2012 at 2:59 AM
Edited Oct 2, 2012 at 3:18 AM

I edited to, compiler show error Error 1 Unknown server tag 'f:function'

<f:function name="Composite.Community.AddThis" runat="server">

<f:param name="Style" value="SmallButtons" />

<f:param name="ProfileId" value="xa-500e264003e16f55" />

</f:function>

changed to

<function name="Composite.Community.AddThis" runat="server">

<param name="Style" value="SmallButtons" />

<param name="ProfileId" value="xa-500e264003e16f55" />

</f:function>

but C1 consider it as static html code, it transform to

<function name="Composite.Community.AddThis">

<param name="Style" value="SmallButtons">

<param name="ProfileId" value="xa-500e264003e16f55">

</function>

Sep 3, 2013 at 3:16 PM
I edited to, compiler show error Error 1 Unknown server tag 'f:function'
You are missing some of the web.config settings.
<configuration>
  <system.web>
....    
    <pages>
      <controls>
        <add tagPrefix="f" namespace="CompositeC1Contrib.Web.UI.F" assembly="CompositeC1Contrib.Rendering.MasterPage"/>
        <add tagPrefix="rendering" namespace="CompositeC1Contrib.Web.UI.Rendering" assembly="CompositeC1Contrib.Rendering.MasterPage"/>
      </controls>
    </pages>    
  </system.web>
</configuration>
Make sure that you have installed CompositeC1Contrib's Master Pages support