Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
Hi,
 
I would like to know if, using visual studio express 2010, I can build a web project using both visual basic .net and c# .net?
 
Eg: if I create new solution based on vb, can I add new page with code behind using c#?
 
Or, can I create one class in c# and other class in vb?
 
Some kind of mix?
 
any clue ?
 
thanx a lot.
Posted 24-Nov-10 22:46pm
Edited 24-Nov-10 23:45pm
v2
Comments
Dalek Dave at 25-Nov-10 4:45am
   
Edited for Grammar and Readability.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 5

May Be you can Develop..,
 
I develop a Web control(not DLL) in vb where my all pages in c#.
 
i tried in vs 2008.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

Yes, you can develop different web forms (pages) in two different languages. Same page can't have two different languages.
 
The page directive for c# will be
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>
and VB.Net will be
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
 
I have tried this in 2008 express editions, not in 2010
  Permalink  
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

You can create C# and VB.NET combined when you are creating it as webpage project. if you are going for solution project you cant use cross interoperability.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

AFAIK, no - a project is normally in either C# or VB, but you can't mix the two. You can add a C# and a VB project to the same solution, making one or both of them separate assemblies (DLL)
  Permalink  

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 555
1 Kornfeld Eliyahu Peter 409
2 Maciej Los 369
3 DamithSL 196
4 OriginalGriff 188
0 OriginalGriff 6,353
1 DamithSL 4,854
2 Maciej Los 4,466
3 Kornfeld Eliyahu Peter 4,058
4 Sergey Alexandrovich Kryukov 3,897


Advertise | Privacy | Mobile
Web04 | 2.8.141220.1 | Last Updated 26 Nov 2010
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100