Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0EditControlFactory - Using BuildManager.GetType?EditControlFactory - Using BuildManager.GetType?
Previous
 
Next
New Post
11/14/2007 9:39 AM
 

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.

 

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0EditControlFactory - Using BuildManager.GetType?EditControlFactory - Using BuildManager.GetType?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out