user control in C#,web page in VB

G

Guest

hi,

Im a newbie.I was wondering if I can include user controls written in C# in
a web page that uses Vb.net for its code behind?Since all code gets compiled
to MSIL i feel it should be possible I think.

Thanks in advance for your replies.

cooltech77
 
S

Steve C. Orr [MVP, MCSD]

The .NET framework supports this but Visual Studio 2003 and before do not
support mixing languages within a project.
Visual Studio 2005 does permit this, however.
 
G

Guest

Thanks!
That helped.

cooltech77

Steve C. Orr said:
The .NET framework supports this but Visual Studio 2003 and before do not
support mixing languages within a project.
Visual Studio 2005 does permit this, however.
 
B

Bruce Barker

yes. with a few tricks.

1) don't use a code behind
2) use a seperate project, and copy the dll and ascx to the current project
3) create a seperate proj for the c# codebehind, which you include in the
solution, and add the ascx to the current project.

-- bruce (sqlwork.com)
 
J

JIMCO Software

Bruce said:
yes. with a few tricks.

1) don't use a code behind
2) use a seperate project, and copy the dll and ascx to the current
project 3) create a seperate proj for the c# codebehind, which you
include in the solution, and add the ascx to the current project.

Be careful using option 1 as it may cause you to suffer from fragmentation.
Inline ASP.NET pages are not batched and if you have a lot of them, you can
end up with a lot of small assemblies in memory. If you have enough of
them, you can end up with an OutOfMemoryException due to fragmentation.

--
Jim Cheshire
JIMCO Software
http://www.jimcosoftware.com

FrontPage add-ins for FrontPage 2000 - 2003
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top