OK - Hi Gang...
I'm building a fairly sophisticated DNN module. I have gone back and forth between developing using Michael Washington (and others) methodologies (developing classes with App_Code and DesktopModules) and trying WAP projects separated from the DNN core website. My only real success has been with using App_Code. However, it's fairly easy to turn the App_Code into a dll using the publish function - although it takes some time to do the publish.
So... Now it became time where I needed a custom control to add to the DataTypes list for the Profile Editor. Basically, I need for the users to select their employer from a list of companies. The companies are maintained in my module (so I cannot use the built-in list manager). I read through all of the posts I could and visited Charles Nurse' website and developed my control. It's fairly sophisticated because it's actually 2 drop-downs that are tied together. That is, the second drop-down is dependent on what it selected from the first drop-down (it's empoyer and job title where job titles are dependent on which employer is selected). I am using javascript to control the population of the second control.
Everything is working, but the debug cycle is killing me. I have the custom control in a sub-folder of App_Code (App_Code/EmployerEditControl), and of course it uses some of my core-module library (App_Code/EmployerModule). So when I publish the website, I end up with 2 dll's: App_SubCode_EmployerEditControl.dll & App_SubCode_EmployerModule. I then have a batch program to copy these 2 dll's into the bin directory of my working DNN installation and copy the source code OUT od App_Code. I can then test the custom control. When I need to code again, I have a batch program to delete the dll's and copy the source code back into my DNN installation.
Issue/Question 1:
Phew! OK... So the main reason for my post is that I'd like to be able to use my custom control from the App_Code folder rather than having to compile it. After compiling, I have to go into the list manager and add: EmployerEditControl, App_SubCode_EmployerEditControl to the DataTypes list in order for the control to show up in the Profile Definition code. This code is then instantiated in EditControlFactory.vb using:
System.Type.GetType(editorInfo.Editor, True, True)
If the code were changed so that we could enter "EmployerEditControl" (without the assemply name), then could the code be re-written to this:
Dim editType As System.Type
If (editorInfo.Editor.IndexOf(",") > 0) Then
editType = System.Type.GetType(editorInfo.Editor, True, True)
Else
editType = System.Web.Compilation.BuildManager.GetType(editorInfo.Editor, True)
End If
That way, I could leave the custom control in App_Code until I was ready to publish it.
Question/Issue 2:
Using my above scenario, after a few code-test-debug cycles above, I seem to lose Intellisense from Visual Studio 2005. The only way to get it back seems to be to restart the program. Does anyone know why? As I copy source-code in and out of the website folders, Visual studio often lists errors and then corrects itself when the dlls are loaded. I'm assuming that it's not very happy with me doing what I am doing. Does anyone have a better development environment? I feel like I've scoured the internet for all of articles I could find in working with development in DNN. I have 2 books (both with small chapters on DNN development). Any help would be greatly appreciated.