Different Language class file in app_code

Question : Can we keep different language class file in app_code directory at the same time?Answer : Yes we can keep the different language class file in the App_Code directory but when we try to keep the different language file in the directory it raise an error like :
Error :
'App_Code/Class2.vb' and 'App_Code/Class1.cs' use a different language, which is not allowed since they need to be compiled together.
To resolve this problem, we keep the different language class file in the different folder and we have to set the codeSubDirectories in the web.config file under the compilation tag like this

<compilation debug="true">
<codesubdirectories>
<add directoryname="CsCode">
<add directoryname="VbCode">
</codesubdirectories>
</compilation>

No comments: