asp.net.ph

Skip Navigation Links

<urlMappings> Section

ASP.NET Syntax   ASP.NET Configuration Sections


Defines a mapping that hides the real URL and maps it to a more user-friendly URL.

<urlMappings
   enabled = "true | false">
   <add ... />
   <clear />
   <remove ... />
</urlMappings>

Attributes and Elements

The following sections describe attributes, child elements, and parent elements.

Attributes


Attribute Description
enabled Optional Boolean attribute.

Determines whether the site navigation feature is enabled.

The default value is true.


Child Elements


Element Description
add Optional element.

Adds the specified UrlMapping object to the collection.

clear Optional element.

Removes all the UrlMapping objects from the collection.

remove Optional element.

Overloaded. Removes a UrlMapping object from the collection.


Parent Elements


Element Description
configuration The required root element in every configuration file used by the common language runtime and .NET Framework applications.
system.web Specifies the root element for the ASP.NET configuration settings in a configuration file. Contains configuration elements that configure ASP.NET Web applications and control how the applications behave.

Default Configuration

The following default urlMappings element is configured in the root Web.config file in the .NET Framework version 2.0.

<urlMappings enabled = "true" />

Example

The following example configures the urlMappings element for an ASP.NET application.

<urlMappings enabled = "true">
   <clear />
   <add url = "~/Home.aspx" mappedUrl = "~/Default.aspx?tab=home" />
   <remove url = "~/Home2.aspx" />
</urlMappings>
See Also

ASP.NET Configuration   UrlMappingsSection Class   UrlMapping Class   UrlMappingCollection Class



© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note