Ask a Question related to ASP.NET Building Controls, Design and Development.
-
shapper #1
Change the tag prefix of a custom control
Hello,
How can I change the tag prefix of a custom control.
My Asp.Net 2.0 custom control tag prefix is cc1.
Thanks,
Miguel
shapper Guest
-
Composite Control with FormView property tag prefix attribute?
Hi, I've developed a Composite control designed to take one FormView and one SqlDataSource as properties. I can add my composite control to the... -
Custom web control not responding to change
Hi, Since I ran into a problem with nested user web controls I decided I was (???) better off implementing this as a custom web control. Well, I... -
Web Custom Control, design-time property doesn't change attribute
Hi, This seems to be a simple problem, but I am unable to figure out what is wrong: I have a Web Custom Control, with two properties (both are... -
Create a custom control to change the page theme
Hi. Anyone knows how can I change the theme from my custom control. My custom control render a dropdownlist with the availables themes, getting in... -
Properties pane of custom control doesn't change in design time
Hi, I have implemented the code similar to the one on the link:... -
Teemu Keiski #2
Re: Change the tag prefix of a custom control
Hi,
you can specify the prefix with @register directive on top of the page
< %@Register TagPrefix="myprefix" Namespace="System.MyControls"
Assembly="System.MyControls" % >
in ASP.NET 2.0, if you omit the Assembly attribute, control is looked from
App_Code
--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
[url]http://blogs.aspadvice.com/joteke[/url]
"shapper" <mdmoura@gmail.com> wrote in message
news:1160503164.210486.158520@e3g2000cwe.googlegro ups.com...> Hello,
>
> How can I change the tag prefix of a custom control.
> My Asp.Net 2.0 custom control tag prefix is cc1.
>
> Thanks,
> Miguel
>
Teemu Keiski Guest
-
shapper #3
Re: Change the tag prefix of a custom control
I think I am not understanding.
I created a few custom controls and I compiled my project to a dll
library.
When I drag one of my custom controls from the toolbox to an Aspx page
I get:
<cc1:MyCustomControl> ....
What I want is to change cc1 to something else.
I supose I need to do this inside my library code before I compile it.
I just don't know where.
I have a VB file for each custom control I create.
Thanks,
Miguel
Teemu Keiski wrote:> Hi,
>
> you can specify the prefix with @register directive on top of the page
>
> < %@Register TagPrefix="myprefix" Namespace="System.MyControls"
> Assembly="System.MyControls" % >
>
> in ASP.NET 2.0, if you omit the Assembly attribute, control is looked from
> App_Code
>
> --
> Teemu Keiski
> ASP.NET MVP, AspInsider
> Finland, EU
> [url]http://blogs.aspadvice.com/joteke[/url]
>
> "shapper" <mdmoura@gmail.com> wrote in message
> news:1160503164.210486.158520@e3g2000cwe.googlegro ups.com...> > Hello,
> >
> > How can I change the tag prefix of a custom control.
> > My Asp.Net 2.0 custom control tag prefix is cc1.
> >
> > Thanks,
> > Miguel
> >shapper Guest
-
Teemu Keiski #4
Re: Change the tag prefix of a custom control
The prefix is specified always on top of the aspx page on @Register
directive, since the control needs to be registered on the page. Despite
that its a custom control (or user control whatever, same thing applies),
and that's the prefix you use omn the page. cc1 is the default.
--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
[url]http://blogs.aspadvice.com/joteke[/url]
"shapper" <mdmoura@gmail.com> wrote in message
news:1160529906.415724.131200@i3g2000cwc.googlegro ups.com...>I think I am not understanding.
> I created a few custom controls and I compiled my project to a dll
> library.
> When I drag one of my custom controls from the toolbox to an Aspx page
> I get:
> <cc1:MyCustomControl> ....
>
> What I want is to change cc1 to something else.
> I supose I need to do this inside my library code before I compile it.
> I just don't know where.
> I have a VB file for each custom control I create.
>
> Thanks,
> Miguel
>
> Teemu Keiski wrote:>>> Hi,
>>
>> you can specify the prefix with @register directive on top of the page
>>
>> < %@Register TagPrefix="myprefix" Namespace="System.MyControls"
>> Assembly="System.MyControls" % >
>>
>> in ASP.NET 2.0, if you omit the Assembly attribute, control is looked
>> from
>> App_Code
>>
>> --
>> Teemu Keiski
>> ASP.NET MVP, AspInsider
>> Finland, EU
>> [url]http://blogs.aspadvice.com/joteke[/url]
>>
>> "shapper" <mdmoura@gmail.com> wrote in message
>> news:1160503164.210486.158520@e3g2000cwe.googlegro ups.com...>> > Hello,
>> >
>> > How can I change the tag prefix of a custom control.
>> > My Asp.Net 2.0 custom control tag prefix is cc1.
>> >
>> > Thanks,
>> > Miguel
>> >
Teemu Keiski Guest
-
gerry #5
Re: Change the tag prefix of a custom control
look at the attribute [assembly:TagPrefix()]
[url]http://msdn2.microsoft.com/en-us/library/ms366537.aspx[/url]
"Teemu Keiski" <joteke@aspalliance.com> wrote in message
news:%23EvHtgw7GHA.2120@TK2MSFTNGP03.phx.gbl...> The prefix is specified always on top of the aspx page on @Register
> directive, since the control needs to be registered on the page. Despite
> that its a custom control (or user control whatever, same thing applies),
> and that's the prefix you use omn the page. cc1 is the default.
>
> --
> Teemu Keiski
> ASP.NET MVP, AspInsider
> Finland, EU
> [url]http://blogs.aspadvice.com/joteke[/url]
>
>
>
> "shapper" <mdmoura@gmail.com> wrote in message
> news:1160529906.415724.131200@i3g2000cwc.googlegro ups.com...>> >I think I am not understanding.
> > I created a few custom controls and I compiled my project to a dll
> > library.
> > When I drag one of my custom controls from the toolbox to an Aspx page
> > I get:
> > <cc1:MyCustomControl> ....
> >
> > What I want is to change cc1 to something else.
> > I supose I need to do this inside my library code before I compile it.
> > I just don't know where.
> > I have a VB file for each custom control I create.
> >
> > Thanks,
> > Miguel
> >
> > Teemu Keiski wrote:> >> >> Hi,
> >>
> >> you can specify the prefix with @register directive on top of the page
> >>
> >> < %@Register TagPrefix="myprefix" Namespace="System.MyControls"
> >> Assembly="System.MyControls" % >
> >>
> >> in ASP.NET 2.0, if you omit the Assembly attribute, control is looked
> >> from
> >> App_Code
> >>
> >> --
> >> Teemu Keiski
> >> ASP.NET MVP, AspInsider
> >> Finland, EU
> >> [url]http://blogs.aspadvice.com/joteke[/url]
> >>
> >> "shapper" <mdmoura@gmail.com> wrote in message
> >> news:1160503164.210486.158520@e3g2000cwe.googlegro ups.com...
> >> > Hello,
> >> >
> >> > How can I change the tag prefix of a custom control.
> >> > My Asp.Net 2.0 custom control tag prefix is cc1.
> >> >
> >> > Thanks,
> >> > Miguel
> >> >
>
gerry Guest



Reply With Quote

