Last post Oct 23, 2008 09:02 AM by jheyse
Oct 22, 2008 05:55 PM|jwize|LINK
I setup a custom control that I want to reference from a custom insert page (CustomPages/Project/Insert.aspx for example). When I try to reference the custom control which is ~/DynamicPages/Controls/mycontrol.ascx the reference isn't resolved and there
is a not found exception. Is there a different way I should be going about implementing this sort of custom control functionality.
custom control reference
Oct 22, 2008 07:37 PM|jheyse|LINK
How are you referencing the control? Is it static or dynamic? Can you provide some code examples?
Oct 22, 2008 09:24 PM|jwize|LINK
Control .... DynamicData/Controls/MyControl.ascx
<%@ Page <for custom project Insert.aspx.... %>
<%@ Rererence Src="~/DynamicData/Controls/MyControl.ascx" TagPrefix="bosi" TabName="Editor" %>
<bosi:Editor id="editor1" runat="server" />
Note that I typed this out by hand. Be sure that there are no incorrect paths in my code. DynamicData/Controls/MyControl.ascx also didn't work. I didn't try ../../Controls.
Oct 22, 2008 10:20 PM|ricka6|LINK
It shouldn't be any different from the way the page templates refrence the GridViewPager and the FilterUserControl. Look at any of the page templates
<%@ Register src="~/DynamicData/Content/GridViewPager.ascx" tagname="GridViewPager" tagprefix="asp" %>
<%@ Register src="~/DynamicData/Content/FilterUserControl.ascx" tagname="DynamicFilter" tagprefix="asp" %>
I've added controls to ~/DynamicData/Content/ and refrenced them in the page templates.
Oct 23, 2008 09:02 AM|jheyse|LINK
If I had to guess, I would think the UriRouting may be causing you an issue while trying to reference the ~/DynamicData/Controls/ directory. Is there any reason you can't move your Controls directory to ~/DynamicData/Content/Controls?