Connecting Tech Pros Worldwide Help | Site Map

Creation of subprojects

Member
 
Join Date: Nov 2008
Posts: 39
#1: Nov 17 '08
Hi,
Suppose i have two different applications.one is in C#.net and another is in VB.net
How i will combine these two applications.Please reply.
nukefusion's Avatar
Expert
 
Join Date: Mar 2008
Location: Essex, UK
Posts: 197
#2: Nov 17 '08

re: Creation of subprojects


You can combine projects written in any of the different .NET languages into one solution by doing the following.
Right-click the solution in the solution explorer and goto "Add", then choose either new or existing project. In the case of "existing project" you will have to browse on disk to the location of the solution file for the existing project. Once you've done this the project will show up in the list.

You will then also be able to call code in your C# project using VB syntax from the VB project and vice-versa.
Member
 
Join Date: Nov 2008
Posts: 39
#3: Nov 18 '08

re: Creation of subprojects


Quote:

Originally Posted by nukefusion

You can combine projects written in any of the different .NET languages into one solution by doing the following.
Right-click the solution in the solution explorer and goto "Add", then choose either new or existing project. In the case of "existing project" you will have to browse on disk to the location of the solution file for the existing project. Once you've done this the project will show up in the list.

You will then also be able to call code in your C# project using VB syntax from the VB project and vice-versa.

Hi,
Thanks for reply, Suppose i have one webapplication named employee(C#) and another one named student(Vb).I give the start up project as student and if i want to access the forms of the employee webapplication it is possible only by giving link in the student webapplication am i right. Is there any other way.
Pls helpme
nukefusion's Avatar
Expert
 
Join Date: Mar 2008
Location: Essex, UK
Posts: 197
#4: Nov 18 '08

re: Creation of subprojects


I don't have much experience of combining web apps. I guess one way you might be able to acheive what you want, would be to provide a link in the form of a url to the pages in the other web app. You could then pass information in using the querystring or something like that.

I don't know from experience whether it's possible in a web app scenario, but maybe you could split out the logic/forms you need to reuse into a seperate class library and reference it from the other project that way.

Certainly it is good practice to seperate code that you would like to reuse into a seperate class library and in your situation that is probably what I would try to do.
Plater's Avatar
Moderator
 
Join Date: Apr 2007
Location: New England
Posts: 7,150
#5: Nov 18 '08

re: Creation of subprojects


Quote:

Originally Posted by deegeorge

if i want to access the forms of the employee webapplication it is possible only by giving link in the student webapplication am i right.

How else would you do it?
Even if they were the SAME project, you would still refer to other pages with links
Newbie
 
Join Date: Nov 2008
Posts: 1
#6: Nov 19 '08

re: Creation of subprojects


Quote:
Suppose I have two different applications. One is in C#.net and the other is in VB.net. How do I combine these two applications?
If you mean combine them at design-time, your question has already been answered - Create a solution and either add existing projects to the solution, or create new projects and select the appropriate .NET language for the new projects.

If you want to combine them at run-time, there are far too many ways to enumerate - however the most common ways are to place both assemblies (.dlls, .exes) in the same folder, or place the independent assemblies in a child bin folder, or install the independent assemblies in the GAC (do read up on the pre-requisites and implications of doing this though).

If they are separate web applications, do read up on Response.Redirect & Server.Transfer to see if those can be of help.

As it says somewhere else, the more information you provide (but be concise please) in your question, the easier it is to give you a relevant response.
Reply


Similar .NET Framework bytes