Copied to clipboard

Flag this post as spam?

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


  • lingjing 28 posts 45 karma points
    Apr 30, 2010 @ 03:30
    lingjing
    0

    Problem register my own library

    Hi All. I created a .Net libary project. It looks like below:

    namespace MyNamespace
    {

      public class XXX

      {}

    }

     

    In the umbraco, I try to register this dll file and call it inside my template like below:

    <%@ Import Namespace="MyNamespace" %>

    <script runat="server" Language="C#">

     protected void Page_Load(object sender, EventArgs e)

    {

    }

    </script>

     

    Can anyone tell me how I can add the reference of my dll file into umbraco? I try "xsltExtensions.config", but it does not seems working.

    Thank you

     

    jing

  • Nikolas van Etten 202 posts 162 karma points
    May 05, 2010 @ 11:34
    Nikolas van Etten
    0

    First of all drop the dll-file(s) you've created into the bin folder of your umbraco installation. If they are dependant on other binaries you need to drop these as well into the bin folder.

    Next open the xsltExtensions.config file and add the extension like this:

    <ext assembly="/bin/name-of-dll-without-dll-extension" type="Fully.Qualified.Name.Of.Type.Including.Namespace" alias="Prefix-to-use-in-xslt" />

    Create a new xslt-file and the extension will be added correctly. You can use it like this:

    <xsl:value-of select="Prefix-to-use-in-xslt:Method"/>

Please Sign in or register to post replies

Write your reply to:

Draft