Developer forum

Forum » Development » new module in new dll

new module in new dll


Reply

Hi,


 


Im developing a new module for a customer who has already a few modules developed and running on his site.


 


Since the old modules are made by another solutionpartner, I have to include this without adding it to the custommodules dll. Is it possible to make some refs from the custommules dll or in some other way make the new module not a part of the costummodules dll.


 


The old solutionpartner can help with setting up refs etc. But I cant ask them to recompile the whole project each time there will be addons, error corrections etc.


 


thanks in advance


 


Regin Madsen


Replies

 
Nicolai Høeg Pedersen
Reply

Hi Regin


 


You can have your code in another assembly than CustomModules.dll - when the solution is open, you can right click the solution in VS 2005s solution explorer, choose properties and change the assembly name and rootnamespace (both should be changed to the same).


 


The only thing the other solution partner needs to do is add a call to the module in the CustomModuleHandler of Default.aspx.vb/cs:


 


Public Class CustomModuleHandler


Public Sub GetCustomModule(ByVal sender As Object, ByVal e As Dynamicweb.Frontend.CustomModuleEventArgs)


Dim strModuleName As String = e.Name


Select Case strModuleName


Case "CustomHello".ToLower


Dim myCustomHello As New CustomHello


e.Output = myCustomHello.Hello(e.ParagraphRow, e.Pageview)


End Select


End Sub


End Class


 


After doing this you are able to upload your assembly and aspx files with changes without changing the original custommodule.dll.


 


If needed you will also be able to "take over" the Default.aspx file and the code of Default.aspx.vb/cs - just upload your version of the Default.aspx where the @page directive:


 


In stead of this


<%@ Page AutoEventWireup="false" Codebehind="Default.aspx.vb" CodePage="65001" Inherits="CustomModules._Default" Language="vb" ValidateRequest="false" %>


 


Should be something like this:


<%@ Page AutoEventWireup="false" Codebehind="Default.aspx.vb" CodePage="65001" Inherits="YourNewAssemblyName._Default" Language="vb" ValidateRequest="false" %>


 


Just remember to make references to the modules provided by the first solutionpartner in the CustomModulesHandler

 

You must be logged in to post in the forum