Hmmm. So you can't mix and match lnaguages in a single Web application. But
you can write a dll in say C# and use it in a VB.NET/ASP.NET application,
right?
I wonder if you know the answer to my second question. My Visual Studio has
both VB and C#installed. Now when I start a web app, it always defaults to
VB. How do I start a project in C#?
Thanks in advance.
> Hmmm. So you can't mix and match lnaguages in a single Web application.
> But
> you can write a dll in say C# and use it in a VB.NET/ASP.NET application,
> right?
The DLL generated for the code-behind code must be written in a single
language. Other thing is that you code-behind code uses an external DLL that
you have written in a different language, that is possible of course.
> I wonder if you know the answer to my second question. My Visual Studio
> has
> both VB and C#installed. Now when I start a web app, it always defaults to
> VB. How do I start a project in C#?
What do you mean with "I start a web app".
- If you open an existing Web App, the Add File uses the language of the
project of the Web App.
- If you create a new Web App, you can choose if the project is VB.NET or C#

Signature
Carlos J. Quintero
MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code, design and document much faster.
http://www.mztools.com
Jeffrey Roughgarden - 14 Jan 2005 19:05 GMT
> - If you create a new Web App, you can choose if the project is VB.NET or C#
>
> Carlos J. Quintero
Carlos,
Sorry to be dense, but when I create a new Web App, it comes up in vb.net. I
don't get a choice to start in C#. Where do you get the choice?
The top line on the HTML is:
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb"
Inherits="WebApplication1.WebForm1"%>
I also have AssemblyInfo.vb, Global.asax.vb, and a Web.config that includes
the following:
<compilation defaultLanguage="vb" debug="true" />
Why is it assuming vb? How can I make it create a new Web app in C#?
Thanks in advance to anyone who can clear up this probably trivial problem.
Jeff Roughgarden, MCSD, MCDBA
Carlos J. Quintero [.NET MVP] - 17 Jan 2005 10:51 GMT
- Open VS.NET
- Click the File, New, Project... menu
- You get a New Project dialog. In this dialog, to the left there is a
Project Types treeview which contains at least "Visual Basic Projects",
"Visual C# Projects", etc. Once you choose one of them, to the right you
have a list of templates and you select ASP.NET Web application.
The treeview shows only the language packages (Visual Basic, Visual C#,
Visual J#, etc.) that you selected for installation when you installed
Visual Studio .NET.
Do you get that New Project dialog? Which project types do you get?

Signature
Carlos J. Quintero
MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code, design and document much faster.
http://www.mztools.com
>> - If you create a new Web App, you can choose if the project is VB.NET or
>> C#
[quoted text clipped - 24 lines]
>
> Jeff Roughgarden, MCSD, MCDBA
Jeffrey Roughgarden - 18 Jan 2005 02:39 GMT
Thanks, Carlos. I finally got it.
You can have projects of different languages in the same solution, but
within a project all has to be in one language.
And yes, I see where I get to chose the language when I open a new project.
Sorry to have been so dense; thanks again.