tags:

views:

113

answers:

3

Hello,

I've got an existing asp.net project written in vb.net. Another person has written a user control in c#.

Could you please let me know the steps for adding that C# user control to the vb.net app?

I've tried copying them to the folder and using "Add existing item", however it doesn't compile the code behind at all.

Thanks, Fidel

+1  A: 

create a new asp.net user control library project with c#, add C# user control to that project, than in your visual basic project add reference to that library and that's it ;)

ArsenMkrt
Yep this sounds like the go, thanks mate
Fidel
A: 

The C# control will need to be in a seperate dll. You can then add a reference to this dll in your vb project. Then register the control in the page directive or web.config, like normal.

Matt Dearing
+1  A: 

You could use this tool to add the control to the VS toolbox.

An example of usage (choose either /vs2005 or /vs2008 depending on your VS version):

TOOLBOX.EXE [/vs2005] [/vs2008] /installdesktop assembly tabname
Ando