Error Creating Control

Topics: Controls
Jul 26, 2007 at 1:09 AM
When I try to view aspx page in design model, error creating control displayed. Anyone know ?
Coordinator
Jul 26, 2007 at 12:08 PM
BlogEngine is build without using the designer in Visual Studio, so I've never had that issue. I don't know what cases it, sorry.
Jul 26, 2007 at 6:24 PM
Add this to your web.config file and build the site.

<compilation debug="true" >
<codeSubDirectories>
<add directoryName="Controls"/>
</codeSubDirectories>
</compilation>

From there you will have Intellisense access to the classes in the Controls directory. You will not see any contents in the controls. You will only see the gray rectangle.

There are errors that get rendered within the controls. I get an error in the AuthorList webcontrol, in design view. The error says "Unable to connect to SQL Server database." This does not make any sense to me yet.


ukmagicow wrote:
When I try to view aspx page in design model, error creating control displayed. Anyone know ?

Jul 27, 2007 at 5:10 AM


ukmagicow wrote:
When I try to view aspx page in design model, error creating control displayed. Anyone know ?


shall we modify those control into web user control ?
Jul 27, 2007 at 3:28 PM
That is an option. You could also add it to the business object assembly, or create a new one, to handle all of the custom controls. If you add them to a web user control then you could begin to standardize some of the things that have to be hand created in themes.

For instance, you could have the ascx render a title with a specific css class and the body of the ascx with another css class. That way all a user has to do is drag and drop the control into a site.master and modify the stylesheets. You could also put the titles in resource files, etc.

If you chose the later you will run into issues with the next release. Your current themes all use typed words for the titles such as BlogRoll, Authors, etc. You could move the controls to the dll and phase them out and release new themes using the new method.

Let me know your thoughts.


ukmagicow wrote:


ukmagicow wrote:
When I try to view aspx page in design model, error creating control displayed. Anyone know ?


shall we modify those control into web user control ?