As I told you yesterday we are working on a mashup for our gallery module to be able to integrate gallery images in a html module. Of course the right thing to do is of course to use the current html module that are shipped with DNN. Easy? Yes it should be, if the DNN core team didn't decided to change the way it is implemented in DNN. Now there is this JIT compiled dll of the html module, which leaves us without any dll that we can reference to if we want to reuse this code.
Never the easy path....
Looking through the dnn support forum made me realize that there is only one way to accomplish this task, simply copy and paste into your project. But wait, I am using C# and not VB which the rest of DNN is implemented in, how the heck am I going to solve this issue. Well the path that seemed so easy a while ago of course led to roaming the net for resources and trial and error... again :(. However I decided that writing my own code for html module handling was still out of the question. Also converting the html module classes to C# was also not an option.
Solution, then?
I came up with the least time consuming option. I created a class library and put all the code files for the dnn html code into it. I had of course a little job to fix all the missing references and some changes for the provider to work with my namespace, but then it is a go. The only negative thing for doing in this way is that I have to maintain this class library when new versions of the html module are released.
Back on track then?
Yes, this little work around did the trick, but I still wanna know why a framework uses JIT compiled dlls and forces its users to do stupid work arounds for resusing code.
The module is going well. By the end of this week it should be finished to be downloadable here. Stay tuned!
/Tobias