I'm creating a macro in Umbraco. I'm using a .NET user control and I add the .dll to the bin folder. But still I have the same error: Error loading userControl '~/usercontrols/Slider.ascx'
Could someone help me? Thank YOU,
I'm creating a macro in Umbraco. I'm using a .NET user control and I add the .dll to the bin folder. But still I have the same error: Error loading userControl '~/usercontrols/Slider.ascx'
Could someone help me? Thank YOU,
You can check this video to double check the steps you performed. You need to make sure the following things.
2) You need to have DLL in bin directory
3) You need to have all the Bin that are reference in your project.
Hope this helps.
This error cause happen when we try to bind item with databound in code. so to remove this error check your OnItemDataBound functions and their code behind.
<asp:Repeater ID="rptFooterMainNav" runat="server" OnItemDataBound="rptFooterMainNav_OnItemDataBound">
Default.ascx.cs
protected void rptFooterMainNav_OnItemDataBound(object sender, RepeaterItemEventArgs e) {
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) {
Node itm = e.Item.DataItem as Node;
if (itm != null) {
Literal ltText = (Literal)e.Item.FindControl("ltText");
HyperLink hlLink = e.Item.FindControl("hlLink") as HyperLink;
if (itm.GetProperty(FieldName.LINK) != null && !string.IsNullOrEmpty(itm.GetProperty(FieldName.LINK).Value)) {
hlLink.NavigateUrl = umbraco.library.NiceUrl(Convert.ToInt16(itm.GetProperty(FieldName.LINK).Value));
}
hlLink.Text = itm.GetProperty(FieldName.TEXT).Value;
}
}
}