Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Retrieving Namespace and TagPrefix for a usercontrol

Reply
Thread Tools

Retrieving Namespace and TagPrefix for a usercontrol

 
 
manso
Guest
Posts: n/a
 
      07-13-2004
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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Retrieving Namespace and TagPrefix for a usercontrol manso ASP .Net Building Controls 0 07-13-2004 11:41 AM
TagPrefix? Brad B. ASP .Net 2 12-29-2003 04:40 PM
Global tagprefix? Kev ASP .Net 0 12-10-2003 04:54 PM
Properties loosing their values, and TagPrefix Mark Norgate ASP .Net Web Controls 0 09-01-2003 04:42 PM
Why doesnt custom TagPrefix work in controls made w/ VBNET? Showjumper ASP .Net 5 07-17-2003 03:48 AM



Advertisments