Copied to clipboard

Flag this post as spam?

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


  • Anton 135 posts 186 karma points
    Feb 16, 2012 @ 09:17
    Anton
    0

    Adding new section on Dashboard

    I create usercontol and add it on Dashboard.config

     </tab>

         <tab caption="new">

          <control>/umbraco/usercontrols/1.ascx</control>

        </tab>

    but thown error when i go to the tab new  Could not load control: '/umbraco/usercontrols/1.ascx'. 

    I have usercontrol by this path '/umbraco/usercontrols/1.ascx'

    Error message: System.Web.HttpException (0x80004005): The file '/umbraco/usercontrols/1.ascx' does not exist. at System.Web.UI.Util.CheckVirtualFileExists(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean ensureIsUpToDate) at System.Web.UI.TemplateControl.LoadControl(VirtualPath virtualPath) at umbraco.cms.presentation.dashboard.OnInit(EventArgs e)

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Feb 16, 2012 @ 09:43
    Jeroen Breuer
    0

    Did you compile the code behind of your usercontrol and added it to the bin folder?

    Jeroen

  • Anton 135 posts 186 karma points
    Feb 16, 2012 @ 09:50
    Anton
    0

    No, I didnt. Do I need to create 1.dll?

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Feb 16, 2012 @ 09:55
    Jeroen Breuer
    0

    Well you could copy the 1.cs file (it's probably named that way because your UC is 1.ascx) into the same folder of where your 1.ascx file is. Or you need to create a 1.dll file which contains the 1.cs file and add that to the bin folder.

    If you don't do anything in the code behind of your usercontrol you can also make sure it doesn't use a code behind by changing the first line in your UC.

    Jeroen

  • Anton 135 posts 186 karma points
    Feb 16, 2012 @ 10:01
    Anton
    0

    I have  1.ascx.cs file into the same folder of where your 1.ascx file is. In this folder /umbraco/usercontrols/ It must be enough? 

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Feb 16, 2012 @ 10:04
    Jeroen Breuer
    1

    That should be enough :). Looks like it can't find the usercontrol for some reason. You might have to play a bit with the paths to see if that works. Try this:

    </tab>

         <tab caption="new">

          <control>/usercontrols/1.ascx</control>

        </tab>

    And than place it in the usercontrol folder which is in the root of your website.

    Jeroen

  • Anton 135 posts 186 karma points
    Feb 16, 2012 @ 10:12
    Anton
    0

    Oh, it copy paste error)) /usercontrols/1.ascx its correct path.Its working now.

     Thanks.

Please Sign in or register to post replies

Write your reply to:

Draft