Ask a Question related to ASP.NET Building Controls, Design and Development.
-
Michael Skelton #1
Can't get TagPrefix to work for custom Web control
Hi
I've created a new custom Web control. I have tried to customize the assembly attribute TagPrefix . However, each time I drag my custom control onto a form, it's TagPrefix is still "cc1". What am I missing here
My control is nested within two namespaces: for example, OuterNamespace and InnerNamespace. Taking that into account, the AssemblyInfo.cs of my custom control's solution contains the following additional lines
..
using System.Web.UI
..
[assembly: TagPrefix("OuterNamespace.InnerNamespace", "mas")
..
I build my custom control, add it to the VS Toolbox, and test it by dropping it on a form. Alas, instead of being prefixed by "mas", the control is still prefixed by "cc1". Any advice on this one
Thanks in advance
-Michael
Michael Skelton Guest
-
using TagPrefix to avoid having @ Register directives on pages using custom controls
Hello, I am designing a custom control in a seperate DLL. I have used the assembly:TagPrefix attribute in this project. The project is included... -
Keep custom property-value in custom rendered control
Hi there, here's the thing I have a custom control (rendered) with a label, textbox and some validators. I use that for entering a birthdate, to... -
ControlDesigner not invoked on custom control when control is rendered within another custom control
I have a custom control that has a simple designer (derived from System.Web.UI.Design.ControlDesigner) associated with it (using the... -
Why doesnt custom TagPrefix work in controls made w/ VBNET?
I cannot get the custom Tag Prefix to work in controls made w/ VBNET. Why??? It works just fine in controls made w/ c#. Is vbnet just buggy? -
Using Table control in a custom composite control. Control does not render properly in design time.
All, I have written a very simple custom composite control that includes a control of type System.Web.UI.WebControls.Table. The control... -
JohnnyV #2
Re: Can't get TagPrefix to work for custom Web control
Hi,
Your approach is perfect. I have done the same thing with my custom
control and I get the custom prefix. My doubt is on some typo on your
namespace. Try changing the namespace of your custom control to something
different and copy and paste the same onto the attribute and see what
happens, to rule out this possibility.
Regards
"Michael Skelton" <anonymous@discussions.microsoft.com> wrote in message
news:92A533F2-638E-4CA0-8B4F-D9788111ED2D@microsoft.com...assembly attribute TagPrefix . However, each time I drag my custom control> Hi,
>
> I've created a new custom Web control. I have tried to customize the
onto a form, it's TagPrefix is still "cc1". What am I missing here?and InnerNamespace. Taking that into account, the AssemblyInfo.cs of my>
> My control is nested within two namespaces: for example, OuterNamespace
custom control's solution contains the following additional lines:dropping it on a form. Alas, instead of being prefixed by "mas", the control>
> ...
> using System.Web.UI;
> ...
> [assembly: TagPrefix("OuterNamespace.InnerNamespace", "mas")]
> ...
>
> I build my custom control, add it to the VS Toolbox, and test it by
is still prefixed by "cc1". Any advice on this one?>
> Thanks in advance,
> -Michael
JohnnyV Guest
-
Michael Skelton #3
Re: Can't get TagPrefix to work for custom Web control
Thanks for the advice, I'll try that.
Michael Skelton Guest



Reply With Quote

