Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why Does DotNetNuke TextEditor Control Break After Editing Module .ascx File

Tags:

dotnetnuke

When building a custom module for DotNetNuke, I have run into this annoying issue whenever I need to edit an .ascx control that makes use of the DotNetNuke TextEditor control.

If I make any change to the .ascx file, the control's designer file reverts the control's definition back to System.Web.UI.UserControl after the change is made. If I manually change the definition back to DotNetNuke.UI.UserControls.TextEditor, I can successfully build until I make another change in the .ascx control again. I have searched the DNN forums and Stack Overflow, but have not found a solution to this problem.

like image 482
davidcfox Avatar asked Sep 30 '15 18:09

davidcfox


1 Answers

After much searching, I have found the answer via the following post:

designer.cs issues with using user control in Visual Studio

Basically, move the "TextEditor" entries that are usually placed in the "designer.cs" file into the code behind file. Once this is done, you can edit the .ascx controls without the annoying need to manually edit the "designer.cs" files repeatedly.

like image 194
davidcfox Avatar answered Jan 05 '23 02:01

davidcfox