Maps a URL that is displayed to users to the URL of a page in your Web application. This class cannot be inherited.
See Also: UrlMapping Members
The System.Web.Configuration.UrlMapping class allows you to map a URL that is displayed to users to a URL that exists in your Web application. Adding a System.Web.Configuration.UrlMapping object to a System.Web.Configuration.UrlMappingCollection is the programmatic equivalent to including an add element in the urlMappings section of a configuration file.
Each System.Web.Configuration.UrlMapping object contains two properties identifying a URL. One property specifies the URL shown to the user; the other specifies a URL in your Web application. Trailing white-space characters are ignored in both the UrlMapping.Url and UrlMapping.MappedUrl properties.
The System.Web.Configuration.UrlMapping property can write information into the related section of the configuration file according to the restrictions defined by the section property System.Configuration.SectionInformation.AllowDefinition whose value is System.Configuration.ConfigurationAllowDefinition.MachineToApplication. Any attempt to write in a configuration file at a level not allowed in the hierarchy will result in an error message generated by the parser. However, you can use this class to read configuration information at any level in the hierarchy.