Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
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
Hi,
"xsltExtensions.config" is the wrong place to go for, you need to copy the dll file to the bin folder and change the line
to
<%@ Import Namespace="MyNamespace" Assembly="MyNamespace.dll" %>
André
Damnit, I mixed up @Import and @Register. The Import-directive does not support the assembly attribute.
But you need to copy your dll file to the bin folder.
Hi Andre
Thanks for reply, I did copy my dll file to the bin folder. but it does not work.
Jing
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Problem with register my own dll
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
Hi,
"xsltExtensions.config" is the wrong place to go for, you need to copy the dll file to the bin folder and change the line
to
André
Damnit, I mixed up @Import and @Register. The Import-directive does not support the assembly attribute.
But you need to copy your dll file to the bin folder.
Hi Andre
Thanks for reply, I did copy my dll file to the bin folder. but it does not work.
Jing
is working on a reply...