473,473 Members | 1,819 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Designating A TagPrefix

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
Sep 5 '06 #1
4 1824

<rl*****@newsgroups.nospamwrote in message
news:uP**************@TK2MSFTNGP05.phx.gbl...
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
Sep 5 '06 #2
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.
Sep 6 '06 #3
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.

Sep 8 '06 #4
Probably.. Actually just haven't had the time to play with it. But it
looks like the right place to go.

"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:3w**************@TK2MSFTNGXA01.phx.gbl...
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.

Sep 11 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Showjumper | last post by:
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?
2
by: Kristoffer Arfvidson | last post by:
Ok, so a new question... Im building my page as dynamic as I can... meaning that I have basicly one aspx page that controls everything... so, I solved this by sending different variables to the...
1
by: Michael Skelton | last post by:
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...
0
by: G Dean Blake | last post by:
( I know this should be posted in the BuildingControls forum but I don't get much help over there) I'm going through this book on asp.net server control development. I wrote a control using the...
2
by: Keith Harris | last post by:
When you drag a web user control onto your design surface, VS.NET automatically assigns the tagprefix = uc1. Does anyone know how to change the default tagprefix for all web controls you drag...
1
by: Michael Tissington | last post by:
I'm trying to convert a project from VS2003 to VS2005 After conversion all of my TagPrefix are not recognized in the body. <%@ Register TagPrefix="Oaklodge" TagName="Curve"...
5
by: Arthur Dent | last post by:
Can anyone tell me what the equivalent in 2005 is for 2003's line <Assembly: System.Web.UI.TagPrefix("Temporal.WEB.Controls", "twebc")> in the AssemblyInfo file? I have an assembly of my own...
1
by: wapsiii | last post by:
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 ...
0
by: Sergei Shelukhin | last post by:
We have a custom (ascx) control that is used in several pages. In ASP.NET 1.1, we had register tagprefix specified in every page that uses this control; in 2.0, I decided to add this control to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.