Custom module migration from 7 to 8

Mike Rocha asked on June 25, 2014 14:48

I am in the process of converting a custom module from v7 to v8. The module is a user control that inherits from CMSToolsPage. I've made all the appropriate code changes and ported the module over to our 8 environment, but I am getting the error 'Type does not inherit from System.Web.UI.UserControl. Are custom module user controls no longer allowed to inherit from CMSToolsPage?

Recent Answers


Brenden Kehren answered on June 25, 2014 15:20

Why would a user control inherit a page object? You might try CMSAdminControl instead.

0 votesVote for this answer Mark as a Correct answer

Mike Rocha answered on June 25, 2014 15:26

Thanks Brenden. I don't really have a good answer for you as to why it inherits from a page object... we went with the CMS7 guide that suggested the use of CMSToolsPage which works well in 7.

I took your suggestion and made the change but I'm now getting an error with internal Kentico code, GetTypeHashCode:

Compiler Error Message: CS0115: 'ASP.cmsmodules_mymodule_default_aspx.GetTypeHashCode()': no suitable method found to override

Source Error:

Line 2851:
Line 2852: [System.Diagnostics.DebuggerNonUserCodeAttribute()] Line 2853: public override int GetTypeHashCode() { Line 2854: return -2003280981; Line 2855: }

Source File: c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\kentico8\903b8ad1\9343fe3d\App_Web_default.aspx.80cc9b9.qvjvtyc2.0.cs Line: 2853

0 votesVote for this answer Mark as a Correct answer

Bill Tran answered on June 27, 2014 09:32

Kentico modules are just regular aspx pages which you register as a module with Kentico CMS.

The modules are then loaded within an iframe from the CMSDesk.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.