Click here to Skip to main content
15,878,852 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a perfectly working C# page in a VS 2017 VB website built with .net 4.
But it won't load in the corresponding web application. Does this mean I can't mix C# and VB in a web application?

What I have tried:

I generated the requisite designer file. The page works fine in a C# web application project.
Posted
Updated 23-Apr-21 14:37pm

1 solution

You cannot mix different languages in the same project.

There's nothing stopping you from converting the C# page into VB.NET.
 
Share this answer
 
Comments
BobbyStrain 23-Apr-21 23:48pm    
Thank you, Dave. I have started the process.
Richard Deeming 26-Apr-21 6:06am    
You could mix languages in a web site project. :)
Shared Code Folders in ASP.NET Web Site Projects | Microsoft Docs[^]
Dave Kreskowiak 26-Apr-21 10:02am    
What a horrifying idea.
BobbyStrain 26-Apr-21 12:46pm    
Maybe you are right. I got the VB page running in the web application, but it behaves strangely. Maybe there is a leak somewhere. I'll work on it for a while. If I can't fix it, you may hear from me again.
BobbyStrain 26-Apr-21 12:43pm    
I started with a web site project 15 years old, but updated to .NET 4. It works fine. It uses MS Sql Server for a data store. My objective in moving to an application is to use a MySql store.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900