Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Peng 41 posts 62 karma points
    Jul 02, 2010 @ 10:05
    Peng
    0

    How to call C# function in umbraco 4.5 ?

     

    HI Guys,

     

    Tried to call the c# function in xslt after upgrading to umbraco 4.5 but for some reason it did not work any more:

    <xsl:stylesheet

           version="1.0"

           xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

           xmlns:msxml="urn:schemas-microsoft-com:xslt"

    xmlns:umbraco.library="urn:umbraco.library" xmlns:ps="urn:percipientstudios-com:xslt" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets" xmlns:LanguageTranslate="urn:LanguageTranslate"

           exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets LanguageTranslate ">

    <!--  return the right value for the id-->

     test <xsl:value-of select="@id"/>

    <!--  call the c# function but return nothing (before its working for umbraco 4.0.3)-->

           <xsl:value-of select="ps:SetCurrentId(current()/@id)"/>

     

    <!--  define the function-->

    <msxml:script language="c#" implements-prefix ="ps">

        <![CDATA[

                                    C# code

        ]]>

      </msxml:script>

     

    Thanks in advance,

     

    Peng

  • Peng 41 posts 62 karma points
    Jul 14, 2010 @ 10:14
    Peng
    0

    Sorry, plase ignore the previous post.

Please Sign in or register to post replies

Write your reply to:

Draft