ADF Tutorials


Purpose
This sample contains the projects and source code for the ADF tutorials included with the Server SDK help system. Each tutorial is included in a separate folder within the ADFTutorial solution.
 
The following tutorials are included:
  • Creating a Web application with the Web controls - Illustrates basic techniques for creating a simple Web application that uses ADF controls. Included in the ADFWebControls folder.
  • Using the Common Data Source API in a Web application - Illustrates how to work with the ADF's Common Data Source API to generate selected features and interact with Web ADF controls. Included in the UsingCommonAPI folder.
  • Accessing ArcGIS Server from a Web application - Shows how to use the ArcGIS Server ArcObjects and SOAP APIs in a Web ADF application. Included in the AccessArcGISServer folder.
  • Accessing ArcIMS from a Web application - Shows how to use the ArcIMS API in a Web ADF application. Included in the AccessArcIMS folder.
  • Developing a scriptable Web ADF control - Illustrates how to build a use a scriptable ADF control. Two projects are included: the scriptable control and the Web site to demonstrate its use. Both are included in the ScriptableControl folder.

How to use

If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders. However, you will need to update the sample to point to the location of the data once you have extracted all the files.

At design time
  1. Verify that the Web ADF for the .NET Framework is installed and functioning properly. For information on installing and configuring the Web ADF, consult the installation guide.
  2. In Windows Explorer, navigate to <ArcGIS install location>\DeveloperKit10.0\Samples\ServerNet\ADFTutorials. You should see a CSharp and VBNet folder.
  3. In Windows Explorer, open the directory referencing the language of your choice: CSharp or VBNet. Copy the folder, ADFTutorials_<language>, to c:\inetpub\wwwroot. The <language> variable may be either CSharp or VBNet.
  4. Open the IIS Manager from Control Panel > Administrative Tools > Internet Information Services (IIS) Manager or Internet Information Services.
  5. In the console tree view on the left, navigate to Local Computer > Web Sites > Default Web Site.
  6. Open the ADFTutorials_<language> folder, and open the tutorial folder of your choice. In the tutorial selected, select the Web site folder and click Properties.
  7. On the Directory tab, click the Create button in the Application Settings section of this panel. Click OK to dismiss the Properties dialog.
  8. Open the solution for the version of the Visual Studio you are using(2008 or 2010) . The Visual Studio version is appended to the solution file name. For example, the Visual Studio 2008 solution file for the ADFTutorials_CSharp sample is ADFTutorialss_CSharp2008.sln and located in the c:\inetpub\wwwroot\ADFTutorials_CSharp folder.
  9. In the Solution Explorer, right-click the Web site under the tutorial of interest and select 'Set as StartUp Project'. Also, right-click the page you wish to view and select 'Set As Start Page'.
  10. The pages in this sample are configured to use data hosted online or included with the SDK. You can create services from SDK data by publishing the map documents located at <ArcGIS install location>\DeveloperKit10.0\Samples\data. For instructions on how to publish a map document to ArcGIS Server, refer to the help topic "Publishing a GIS resource to the server" in the ArcGIS Server Help.
  11. Click the "Debug" drop-down menu and choose "Start".

At run time
  1. Browse to viewer's URL (for example, http://localhost/ADFTutorials_VBNet/ADFWebControls/).
  2. The page in ADFWebControls: Interact with the map. Use the toolbar items. Change layer visibility in the Toc.
  3. The page in UsingCommonAPI: Use drop down lists to select active resource and layer. Use custom tool to select features in the map. Show selection in TaskResults.
  4. The page in AccessArcGISServer: Apply the custom tool in the map to add a point and a buffer around the point as graphics. Graphics are added to the custom graphics element array for a MapDescription.
  5. The page in AccessArcIMS: Apply the custom tool in the map to add a point as graphics in an acetate layer.
  6. The page in ScriptableControl: Move the mouse cursor over the map and note the changes in the coordinate display of the scriptable control.

ADFTutorials_CSharp\AccessArcGISServer\Default.aspx.cs ArcGIS Server tutorial demo.
ADFTutorials_CSharp\AccessArcGISServer\App_Code\PointBufferTool.cs The code behind the user interface
ADFTutorials_CSharp\AccessArcIMS\Default.aspx.cs ArcIMS tutorial demo.
ADFTutorials_CSharp\AccessArcIMS\App_Code\PointTool.cs The code behind the user interface
ADFTutorials_CSharp\ADFWebControls\Default.aspx.cs ADF control demo.
ADFTutorials_CSharp\ScriptableControls\MapCoordinateDisplayWebSite\Default.aspx.cs Scriptable control demo.
ADFTutorials_CSharp\ScriptableControls\MapCoordinateDisplay\Properties\AssemblyInfo.cs Scriptable control demo.
ADFTutorials_CSharp\ScriptableControls\MapCoordinateDisplay\MapCoordinateDisplay.cs Scriptable control demo.
ADFTutorials_CSharp\ScriptableControls\MapCoordinateDisplay\javascript\MapCoordinateDisplay.js Scriptable control demo.
ADFTutorials_CSharp\UsingCommonAPI\Default.aspx.cs Common API demo.
ADFTutorials_CSharp\UsingCommonAPI\App_Code\SelectTool.cs The code behind the user interface
Download the C# files
ADFTutorials_VBNet\AccessArcGISServer\Default.aspx.vb ArcGIS Server tutorial demo.
ADFTutorials_VBNet\AccessArcGISServer\App_Code\PointBufferTool.vb The code behind the user interface
ADFTutorials_VBNet\AccessArcIMS\Default.aspx.vb ArcIMS tutorial demo.
ADFTutorials_VBNet\AccessArcIMS\App_Code\PointTool.vb The code behind the user interface
ADFTutorials_VBNet\ADFWebControls\Default.aspx.vb ADF control demo.
ADFTutorials_VBNet\ScriptableControls\MapCoordinateDisplayWebSite\Default.aspx.vb Scriptable control demo.
ADFTutorials_VBNet\ScriptableControls\MapCoordinateDisplay\Properties\AssemblyInfo.vb Scriptable control demo.
ADFTutorials_VBNet\ScriptableControls\MapCoordinateDisplay\MapCoordinateDisplay.vb Scriptable control demo.
ADFTutorials_VBNet\ScriptableControls\MapCoordinateDisplay\javascript\MapCoordinateDisplay.js Scriptable control demo.
ADFTutorials_VBNet\UsingCommonAPI\Default.aspx.vb Common API demo.
ADFTutorials_VBNet\UsingCommonAPI\App_Code\SelectTool.vb The code behind the user interface
Download the VB.NET files

Download the files for all languages