VBdotnet2005
asked on
C# class in App_code
Is it ok to add C# class to my existing web project - VB , under App_code and use it? Will it runs?
Create the Two separate sub folders in App_code named VBCode (contains VB Class files *.vb) and CSCode (Contains CS Class files *.cs) then modify the web.config like this
<compilation debug="false">
<codeSubDirectories>
<add directoryName="VBCode" />
<add directoryName="CSCode" />
</codeSubDirectories> </compilation>
<compilation debug="false">
<codeSubDirectories>
<add directoryName="VBCode" />
<add directoryName="CSCode" />
</codeSubDirectories> </compilation>
ASKER
One thing, can I call methods from C# classes in VB or the other way around?
ASKER
How can I call C# class in VB page? Is it possbile?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can configure your web application to treat different sub folders in the app folder as different assemblies.
Each folder can then contain source code in a different programming language. The configuration is specified by creating a codeSubDirectories element in the compilation element of the Web.config file and adding a reference to the subfolder. The following example illustrates how you would configure subfolders named VBCode and CSCode to compile into separate assemblies:
<compilation debug="false">
<codeSubDirectories>
<add directoryName="VBCode" />
<add directoryName="CSCode" />
</codeSubDirectories> </compilation>