Syamsoul Azrien Syamsoul Azrien - 2 years ago 113 Question

ASP.NET - App_Code - Mix VB and C# in the same folder

enter image description here

I use WebForms type. and in my website project, there are pages which are using VB and also C#...
It works!...

But the problem is, as you can see on the picture above, I put 'cs' file and 'vb' file in 'App_Code' folder, and there are Error appear.....

The files '/App_Code/BSN3.Class.cs' and '/App_Code/AssemblyInfo.vb'
use a different language, which is not allowed since they need to be
compiled together.

Answer Source

Ok... I already solved the problem..

in Web.Config file, add code

<compilation debug="false">
        <add directoryName="VBCode" />
        <add directoryName="CSCode" />

And just seperate VB and CS code into two folder which are 'VBCode' and 'CSCode' ..

so, it will look like this

enter image description here

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download