Error rendering a custom control

Maybe this is a little MS Visual Studio bug. It is connected to the control registering in the page in case of using a control defined in App_Code folder, not in another assembly. The exception thrown while opening design view of the page is:

Error Rendering Control - [control] An unhandled exception has occurred. There was an error parsing the theme. The assembly attribute cannot be an empty string.

So the VS environment doesn't recognize the control defined in the App_Code. Therefore the control regitration must inlcude the assembly name - "App_Code"

<%@ Register TagPrefix="my" Namespace="MyControls" assembly="App_Code" %>


<add tagPrefix="my" namespace="MyControls" assembly="App_Code" />
in web.config - pages/controls section

1 comment: