Use a VB User Control with a C# Page

  • Thread starter Thread starter Stan Sainte-Rose
  • Start date Start date
S

Stan Sainte-Rose

Hi guys,
How to use a vb user control with a C# page.
I've added the vb user control into the reference section
but when I launch to the page, I get an error saying something like this (I
translate it into english)
The base class has the field 'UC' but its type (U.C_INPUT) is incompatible
with the control type (ASP.C_INPUT_ascx)

Any help

Stan
 
You cannot.

The user control must be in the same assembly as the consumer of the
control. Therefore you cannot mix C# and VB.NET in this way. If you
rewrite it as a custom control you can have the control in a different
assembly (and language)
 
Back
Top