Technical support This forum is closed.
Version 1.x > Technical support > BUG: Could not load ASCX control View modes: 
User avatar
Member
Member
janusz - 5/12/2005 6:03:12 PM
   
BUG: Could not load ASCX control
Hello,

I am having problem in adding a template attribute with User Control (ascx)

If I use existing CMS_MenuItemType.ascx as editing user control for attribute then it is fine.

However, when I create a new user control then I get an error:

----------------------------------------------------------------------------------------------------
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load type 'Kentico.CMS.CMSDesk.CMS_MenuItemType2'
----------------------------------------------------------------------------------------------------

I have tried to create an exact copy of the CMS_MenuItemType.ascx in the same directory. I have changed the following lines:

Public Class CMS_MenuItemType2
<%@ Control Language="vb" AutoEventWireup="false" Codebehind="CMS_MenuItemType2.ascx.vb" Inherits="Kentico.CMS.CMSDesk.CMS_MenuItemType2" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>

If I try to use this new user control in every template then it does not work. I have even tried to replace the CMS_MenuItemType.ascx in Page(Menu Item) template to CMS_MenuItemType2.ascx and it does not work.

I have tried to compile the CMSDESK project and it compiled successfully.

Thanks,

Janusz


User avatar
Guest
admin - 5/12/2005 6:52:44 PM
   
Re: BUG: Could not load ASCX control
Hi Janusz,

Have you copied the CMSDesk.dll library to the main bin folder of your project after compilation? It's necessary to copy that file from the CMSDesk\bin folder to the main \bin folder of the web application every time you recompile the CMSDesk project.

Please let me know if it helped.

Best Regards,

User avatar
Member
Member
janusz - 5/13/2005 12:05:52 PM
   
Re: BUG: Could not load ASCX control
Thanks Petr. It has helped me. I have changed the structure of the projects in my solution:

Solution
WebProject
CMSDesk
CMSLibrary

Webproject and CMSDesk are dependent on CMSLibrary
Webproject is dependent on CMSDesk

The common functions are in CMSLibrary so I can share them in Webproject and CMSDesk as well.

Janusz