user control in C#,web page in VB

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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.
 
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.
 
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)
 
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

Back
Top