ESRI.ArcGIS.ADF.Web.UI.WebControls
UseDefaultWebResources Property
See Also 
ESRI.ArcGIS.ADF.Web.UI.WebControls Namespace > WebControl Class : UseDefaultWebResources Property




If true, the control will use the internal web resources within the assemblies of the Web ADF. If false, the control uses the resources at WebResourceLocation.

Syntax

Visual Basic (Declaration) 
<PersistenceModeAttribute()>
<ResCategoryAttribute("Web Resources")>
<ResDescriptionAttribute("Whether to use the default Web resources within the assemblies of the Web ADF or use custom resources specified in WebResourceLocation.")>
<DefaultValueAttribute()>
Public Property UseDefaultWebResources As Boolean
Visual Basic (Usage)Copy Code
Dim instance As WebControl
Dim value As Boolean
 
instance.UseDefaultWebResources = value
 
value = instance.UseDefaultWebResources
C# 
[PersistenceModeAttribute()]
[ResCategoryAttribute("Web Resources")]
[ResDescriptionAttribute("Whether to use the default Web resources within the assemblies of the Web ADF or use custom resources specified in WebResourceLocation.")]
[DefaultValueAttribute()]
public bool UseDefaultWebResources {get; set;}

Remarks

The Web ADF controls use a client-side library of JavaScript, images and styles, which enable the user to interact with the page and to handle requests and responses from the server. This library is downloaded by the browser when the Web page loads. Where the browser obtains the library depends on this property and WebResourceLocation:

  • If UseDefaultWebResources is true, then the browser obtains the client-side library from the Web ADF assemblies. The Web ADF has an embedded version of the library within its DLLs (assemblies). Because this version is embedded, it cannot be modified by developers. The benefit of the embedded library is that it does not require any of the library's .js files to be available on the Web server. The value is WebResourceLocation is ignored in this case.
  • If UseDefaultWebResources is false, then the browser downloads the client-side library from the location specified in WebResourceLocation. By default, this location is /aspnet_client/ESRI/WebADF. When the Web ADF is installed on an IIS Web server, the client-side library is installed at the Web root at this path (e.g., C:\Inetpub\wwwroot\aspnet_client\ESRI\WebADF). The library may be moved or replicated at another location for a Web application. This option will not work for a file-based Web application (i.e., Cassini) unless the library is copied into the Web application itself.

If customization of the client-side library is required, then the developer can modify the library files. However, at the current release, the client-side library is not documented and is not fully supported for customization.

If multiple Web ADF controls are on the Web page, every control should have the same settings for UseDefaultWebResources (and for WebResourceLocation, if UseDefaultWebResources is false). The page will download a particular resource the first time it occurs on the page from the location specified. If a resource of the same name is required for another control, the resource is reused is from the first location, even if the WebResourceLocation points to a different location.

See Also

© 2010 All Rights Reserved.