0

Is it possible to have both c# and Vb (default.aspx.cs,index.aspx.vb ) in a single site. If so can you give me some ideas or Suggestions.

Muthuram
  • 154
  • 12
  • Hi everyone,is it possible without separating the Class libraries. and as same i have a master page in VB, i want to merge the same into c#. Is that too possible. In that Example the Libraries has been separated. – Muthuram Feb 25 '13 at 12:32

3 Answers3

2

If you're creating a "web site" then each page can use a specified language, because essentially each page is compiled separately. Some can use VB, some can use C#.

Otherwise "web application" which can use only one language.

Zaki
  • 5,540
  • 7
  • 54
  • 91
  • You can even throw in a couple of PHP pages if you have it installed. And off course static HTML pages. – nl-x Feb 25 '13 at 12:37
1

This has been asked so many times on here.

See this blog for example - http://timheuer.com/blog/archive/2007/02/28/14002.aspx

However, I personally recommend you don't mix languages in the same project. Just because you can doesn't mean you should and all that...

Lloyd
  • 29,197
  • 4
  • 84
  • 98
0

Consider seperating your business logic from your pages and making it loosely coupled.

You can then build class libraries in C# and VB.Net in seperate projects which will represent your logic and reference the DLL's and call methods in your a single language from a aspx.cs or aspx.vb.

I wouldn't mix the two languages, especially in an area where it isn't needed.

I would even go as far as using a code convertor to make your web page one language.

LukeHennerley
  • 6,344
  • 1
  • 32
  • 50