ESRI.ArcGIS.ADF.Web.UI.WebControls
JavaScriptFile Property
See Also 
ESRI.ArcGIS.ADF.Web.UI.WebControls Namespace > InteractiveToolbarItem Class : JavaScriptFile Property




Javascript file to include, for implementing a custom client-side action for a toolbar item.

Syntax

Visual Basic (Declaration) 
<EditorAttribute(EditorBaseTypeName="System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", EditorTypeName="ESRI.ArcGIS.ADF.Web.UI.WebControls.Design.ClientToolActionEditor, ESRI.ArcGIS.ADF.Web.UI.WebControls, Version=10.0.0.0, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86")>
<NotifyParentPropertyAttribute(True)>
<ResCategoryAttribute("Client Action")>
<ResDefaultValueAttribute()>
<ResDescriptionAttribute("Javascipt file with code to execute.")>
Public Property JavaScriptFile As String
Visual Basic (Usage)Copy Code
Dim instance As InteractiveToolbarItem
Dim value As String
 
instance.JavaScriptFile = value
 
value = instance.JavaScriptFile
C# 
[EditorAttribute(EditorBaseTypeName="System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", EditorTypeName="ESRI.ArcGIS.ADF.Web.UI.WebControls.Design.ClientToolActionEditor, ESRI.ArcGIS.ADF.Web.UI.WebControls, Version=10.0.0.0, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86")]
[NotifyParentPropertyAttribute(true)]
[ResCategoryAttribute("Client Action")]
[ResDefaultValueAttribute()]
[ResDescriptionAttribute("Javascipt file with code to execute.")]
public string JavaScriptFile {get; set;}

Remarks

Adds a reference to the specified script file to the page that contains the toolbar item. The path specified is literally inserted into a <script> tag in the client-side page (except see note below). The ASP.NET application-relative prefix ~/ therefore cannot be used here.

Currently this only supports JavaScript files within the Web ADF client script library (/aspnet_client/ESRI/WebADF/JavaScript/). If the full path does not include the aspnet_client reference, the script library path is prefixed to the value for this property and used as the path for the script reference. A workaround would be to create a folder inside the website called aspnet_client and put the script file inside it, and include the path in JavaScriptFile.

See Also

© 2010 All Rights Reserved.