<xmod:Register>
<xmod:Register> lets you use a third-party ASP.NET control library inside an XMod Pro view. Each library you want to use needs one <xmod:Register> tag — XMP uses it to look up where the controls live (which assembly, which namespace) and which tag prefix you want to use to reference them.
Place <xmod:Register> outside any <xmod:Template>, typically at the top of the view file. One register tag covers every template in the file.
Example
<xmod:Register TagPrefix="ctb" Namespace="Acme.CoolTools.XMPTools" Assembly="Acme.CoolTools" />
<xmod:Template>
<HeaderTemplate><table></HeaderTemplate>
<ItemTemplate>
<tr>
<td>
<ctb:CoolFader MakeItCool="True" FadeDuration="5">
[[Headline]]
</ctb:CoolFader>
</td>
</tr>
</ItemTemplate>
<FooterTemplate></table></FooterTemplate>
</xmod:Template>The TagPrefix ("ctb") plus the control's class name ("CoolFader") makes the markup name <ctb:CoolFader>. XMP loads the matching control type from the named Assembly and Namespace.
Properties
| Property | Values | Default | Description |
|---|---|---|---|
| TagPrefix * | string | The short prefix used in the tag name — e.g. ctb produces <ctb:ControlName> | |
| Namespace * | string | The .NET namespace where the controls live | |
| Assembly * | string | The DLL filename (without the .dll extension) — e.g. Acme.CoolTools for bin/Acme.CoolTools.dll |
* Required property
Property Details
TagPrefix: A short identifier (letters and numbers) that XMP uses to recognize tags from this library. Pick a prefix that won't collide with
xmod:,asp:, or any other libraries you've registered.Namespace: The .NET namespace containing the control classes you want to use. Supplied by the third-party library's documentation.
Assembly: The filename of the assembly DLL (in the site's
/binfolder), without the.dllextension. Supplied by the third-party library's documentation. Don't include a path or extension — XMP looks under/binautomatically.