Retrieving Namespace and TagPrefix for a usercontrol

M

manso

Hi,

We would like to dynamically retrieve the following information about a
UserControl. The user control has been created with the following control
directive

<%@ Control Language="vb" AutoEventWireup="false" src="Test.ascx.vb"
Inherits="Company.Public.Test" %>

In Test.ascx.vb we've specified

=========================
Imports System.Web.UI

<Assembly: TagPrefix("TestNamespace", "TestTagPrefix")>

Namespace Company.Public
Public Class Test
...
=========================

We are loading this control using LoadControl(). Questions:

- I can't figure out how to get the TagPrefix information (how does VS.NET
do it for custom controls)? We have tried with GetCustomAttribute but it's
not available there.

- The namespace is always "ASP" no matter what I write. Is it because of the
JIT compilation (because of "src=")?

Grateful for any hints.

Thank you,

Manso
 

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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top