locked
Can VB.NET and C# work in the Same Web application? Is it Feasable? RRS feed

  • Question

  • User-1109331295 posted

    Hey Guys/Gals.

    Currently I am a VB.NET Developer and have been thinking for the past day that maybe I should switch to C#.

    Can vb.net and c# pages talk to each other?  I don't want to lose all the VB.NET pages I have made but want to start converting little by little. It makes sense that they should be able to work with each other in the same Web app.  As long as the App_Code folder isn't accessed.  Is this true?

    Help on this one.

    Thursday, May 31, 2007 9:11 AM

Answers

  • User-1630302068 posted

    Yeah, I mean it's really just dependent on your compilation model.  Visual studio's "Web Application Projects" wont allow this because they process everything into a single assembly.  You cant really generate mixed language assemblies w/o doing a lot of work to merge two existing assemblies.   

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, June 2, 2007 2:41 PM

All replies

  • User-1109331295 posted

    bump

    Thursday, May 31, 2007 10:08 AM
  • User-1630302068 posted

    In a .Net 2.0 "Website" all you have to do is specify the language in your page / control directive, in fact this is mandatory.  Now if you're talking a web application project (in vs 2k5 sp1) you'll probably have to add a class library to the solution and reference it.

    Friday, June 1, 2007 8:56 AM
  • User-1109331295 posted

    so it is true that a SINGLE Web Application can have both C# and VB.Net codebehinds?

    Friday, June 1, 2007 9:51 AM
  • User-1630302068 posted

    Yeah, I mean it's really just dependent on your compilation model.  Visual studio's "Web Application Projects" wont allow this because they process everything into a single assembly.  You cant really generate mixed language assemblies w/o doing a lot of work to merge two existing assemblies.   

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, June 2, 2007 2:41 PM