Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You need to postbuild the markup (ASCX files only) from the C# project into your VB Web Application project, and reference those ASCX's instead of the C# ones. Sounds bizarre but believe me it works.</p> <p>1 - Add a post-build event to the C# project that copies the UserControl markup (just the .ASCX files) to a folder in your Web Application project; for example, a folder under the root of your web app called "ExternalUserControls"</p> <p>(Note that they should have the same Inherits property, i.e. the namespace and classname from the C# project.)</p> <p>2 - Make sure the C# project is referenced (sounds like it already is)</p> <p>3 - Add control declarations to the <code>&lt;controls&gt;</code> section of <code>&lt;pages&gt;</code> of <code>&lt;system.web&gt;</code> in web.config: -</p> <pre><code> &lt;system.web&gt; . . &lt;pages&gt; &lt;controls&gt; &lt;add tagPrefix="cc" src="~/ExternalUserControls/MyControl.ascx" tagName="MyControl" /&gt; &lt;add .... etc </code></pre> <p>4 - reference the controls in your page thusly: -</p> <pre><code>&lt;cc:MyControl id="testControl" runat="server" .. </code></pre> <p>5 - make sure you <code>Import</code> the correct namespace for the control as defined in the C# project</p> <p>6 - Note that sometimes the VS Page Designer will refuse to add a variable for your control, so in order to access your control in the code-behind you will need to add a page-level <code>protected</code> (or whatever VB's equivalent is, I can't remember) variable of the correct type, using the same name as in the page markup (testControl in the example above)</p> <p>Let me know if you want an example.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload