You will get a compilation error if you will place C# and VB code along in App_Code directory. This little code snippet for web.config gives your compliper an ability to distinguish between languages. Some of you could ask, i use X language why should i start an application with native support for few ? Real life example explains why would you do that.
real life example:
I had to work on a project large part of which was written in VB, i do understand VB but i feel much more comfortable with C#. I could use great tool by Developer Fusion, a .NET Code Converter but it was much easier to keep the old code and just have new one written in my native language. This way i could utilize already written code inVB.
Important note, if you using VB in multi language project please write your functions as strict as possible to avoid possible compliation issues while use a combination of functions from both App_Code dirs.
code:
Create two new folders inside of App_Code folder, CS for C# code and VB obviously for VB code. Folder names are not important as used only as identifiers for web.config attributes in code below.
<compilation> <codeSubDirectories> <add directoryName="CS" /> <add directoryName="VB" /> </codeSubDirectories> </compilation>
Tags: ASP.NET, web.config