| |||||||||||
@ RegisterASP.NET Syntax ASP.NET Page Syntax Page Directives Associates aliases with namespaces and class names for concise notation in custom server control syntax. <%@ Register tagprefix = "tagprefix" Namespace = "namespace" Assembly="assembly" %> <%@ Register tagprefix = "tagprefix" Tagname = "tagname" src = "pathname" %> Attributes
RemarksUse this directive when you are declaratively adding a custom ASP.NET server control to a page. In custom server control syntax, tagname and tagprefix are always used in conjunction as a colon-separated pair ( tagprefix:tagname ). You can use tagprefix alone in a custom server control tag, but not tagname. If you use only the tagprefix attribute, you must include Assembly and Namespace attributes. Syntax ExampleThe following code fragment uses <%@ Register Tagprefix = "MyTag" Namespace = "MyCompany:myNamespace"
Assembly = "myAssembly" %>
<%@ Register Tagprefix = "Acme" Tagname = "AdRotator"
src = "AdRotator.ascx" %>
<html>
<body>
<form runat="server">
<MyTag:MyControl id="Control1" runat="server" />
<br>
<Acme:AdRotator file = "myads.xml" runat="server" />
</form>
</body>
</html>
See Also |
| ||||||||||
Check out related books at Amazon
© 2000-2008 Rey Nuñez All rights reserved.
If you have any question, comment or suggestion
about this site, please send us a note
You can help support aspxtreme