Skip to content

<xmod:NavigateUrl>

<xmod:NavigateUrl> calls DNN's NavigateUrl() API and writes the resulting URL into the rendered output. Going through DNN means the result honors the site's friendly-URL provider, language, and URL rewriting rules — typing the URL by hand wouldn't.

Most commonly, you'll embed the tag inside an HTML attribute (e.g. href) to produce a link to a specific page with parameters.

Example

Render a friendly URL to page 237 with an eid parameter pulled from the current row:

html
<xmod:Template Id="Employees">
  <ListDataSource CommandText="SELECT * FROM Employees" />
  <ItemTemplate>
    [[FirstName]] [[LastName]]<br />
    <a href="<xmod:NavigateUrl TabId='237'><Parameter Name='eid' Value='[[Id]]' /></xmod:NavigateUrl>">View Work History</a>
  </ItemTemplate>
</xmod:Template>

When DNN's friendly-URL provider is in use, the rendered URL looks like /work-history/eid/42 rather than /Default.aspx?TabId=237&eid=42.

Properties

PropertyValuesDefaultDescription
TabIdinteger(current page)The DNN page (tab) ID to link to. When omitted, the URL points to the current page
ControlKeystringOptional control key — useful when linking to a specific module action page

Child Tags

TagRequiredDescription
<Parameter>optionalOne URL parameter. Add as many as needed

<Parameter>

Each <Parameter> adds one query-string-style parameter to the generated URL. Values are URL-encoded automatically. All values are passed as text (no DataType).

AttributeValuesDefaultDescription
Name *stringParameter name
Valuestring | tokenParameter value

Property Details

  • TabId: The DNN-assigned page ID. "Tab" is the legacy DNN term for what users now call a page. To find a page's TabId, hover the page in DNN's page management UI or look at its URL when editing. Omit this property to generate a URL for the current page.

  • ControlKey: Used to load a specific module action — for example, Edit to open a module's edit screen. Rarely needed in template markup. Requires TabId to be set.