PC Review


Reply
Thread Tools Rate Thread

Designating A TagPrefix

 
 
Guest
Posts: n/a
 
      5th Sep 2006
Is there a way to define a controls tagprefix in the control itself? When I drop a control on a web page it's tagprefix defaults to uc1, as expected. Where can I set it so that it's default tag prefix is something else, so i don't have to change 'em every time I drop a control on the form? Thanks.

Jerry
 
Reply With Quote
 
 
 
 
Mythran
Guest
Posts: n/a
 
      6th Sep 2006

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
Is there a way to define a controls tagprefix in the control itself? When I
drop a control on a web page it's tagprefix defaults to uc1, as expected.
Where can I set it so that it's default tag prefix is something else, so i
don't have to change 'em every time I drop a control on the form? Thanks.

Jerry




Jerry,

Not sure about 2005, but in 2003 you would use an assembly attribute named
TagPrefix which is under the System.Web.UI namespace (IE: <Assembly:
System.Web.UI.TagPrefix("MyNamespaceHere", "MyPrefix")

HTH,
Mythran


 
Reply With Quote
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      6th Sep 2006
Hello Jerry,

I think the "System.Web.UI.TagPrefixAttribute" class Mythran mentioned is
what you want. You can specify the tagprefix for controls under a certain
namespace in your assemby. e.g.

================
[assembly: TagPrefix("URLSiteLib", "urlsitelib")]

namespace URLSiteLib
{
[DefaultProperty("Text")]
[ToolboxData("<{0}:MyControl1 runat=server></{0}:MyControl1>")]
public class MyControl1 : WebControl
{
................

================

#TagPrefixAttribute Class
http://msdn2.microsoft.com/en-us/lib...ixattribute.as
px

BTW, use the default randomly generated control prefix can ensure that your
tagprefix won't conflict with other class library's controls.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================



This posting is provided "AS IS" with no warranties, and confers no rights.


 
Reply With Quote
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      8th Sep 2006
Hello Jerry,

Does the suggestion in the previous reply helps? If there is still anything
we can help, please feel free to let me know.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

This posting is provided "AS IS" with no warranties, and confers no rights.

 
Reply With Quote
 
Guest
Posts: n/a
 
      12th Sep 2006
Probably.. Actually just haven't had the time to play with it. But it
looks like the right place to go.

"Steven Cheng[MSFT]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hello Jerry,
>
> Does the suggestion in the previous reply helps? If there is still
> anything
> we can help, please feel free to let me know.
>
> Sincerely,
>
> Steven Cheng
>
> Microsoft MSDN Online Support Lead
>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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
tagPrefix=asp nk Microsoft ASP .NET 0 26th Jan 2007 04:39 PM
TagPrefix is not recognized ahuja.madhur@gmail.com Microsoft ASP .NET 3 21st Jul 2006 06:23 PM
TagPrefix issue G Dean Blake Microsoft ASP .NET 0 13th Dec 2004 12:39 AM
TagPrefix? Brad B. Microsoft ASP .NET 2 29th Dec 2003 04:40 PM
Global tagprefix? Kev Microsoft ASP .NET 0 10th Dec 2003 04:54 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:19 AM.