Saturday, March 24, 2012

Tagprefix to my server controls

I'd like to set the tagprefix of my server controls automatically when
they are dragged to the webform.

My code reads

<Assembly: TagPrefix("CtrlLib", "abc")>
Namespace CtrlLib

<DefaultProperty("Text"), ToolboxData("<{0}:TextBoxPlus
runat=server></{0}:TextBoxPlus>")> _
Public Class TextBoxPlus : Inherits
System.Web.UI.WebControls.TextBox

However, after adding the control to the toolbox and dragging the
control to the webform the tagprefix still reads <cc1:TextBoxPlus ...

What am I missing?

/MOn Thu, 30 Mar 2006 18:28:34 -0600, wapsiii <wapsiii@.otmail.com> wrote:

> I'd like to set the tagprefix of my server controls automatically when
> they are dragged to the webform.
> However, after adding the control to the toolbox and dragging the
> control to the webform the tagprefix still reads <cc1:TextBoxPlus ...
> What am I missing?
> /M

for 1.x?
http://weblogs.asp.net/kwarren/arch...1/07/48457.aspx

note the issue mentioned in the comments, that all controls with the same
prefix have to be in same assembly...not a huge deal, most times you are
using 1 assembly. dunno if 2.x does it differently...

--
Craig
Microsoft MVP - ASP/ASP.NET

0 comments:

Post a Comment