In this topic
- Integrated components and functionality
- Web controls
- Web mapping application template
- SDK library reference
- Project context menus and dialog boxes
- Characteristics of developing applications
The Web Application Developer Framework (ADF) supports Visual Studio 2008 and 2010 with the Microsoft .NET Framework versions 2.0, 3.0, and 3.5. Upon installation, the Web ADF integrates the following components and functionality into Visual Studio 2008 and 2010.
A set of Web ADF controls are added to the Visual Studio Toolbox panel under the ArcGIS Web Controls tab. The controls are packaged in the ESRI.ArcGIS.ADF.Web.UI.WebControls.dll assembly. See the following screen shot of the Toolbox and ArcGIS Web Controls tab.
A) VS 2008 toolbox
B) VS 2010 toolbox
The Web ADF includes a single Web Mapping Application project template in C# and VB.NET format. The template provides a preset Web page design and contains a comprehensive set of Web ADF controls to start working productively. The template can be customized. See the following screen shot that shows the Web Mapping Application template under the Templates area in Visual Studio. A) and (B) represents VS 2010.
A) VS 2008 snapshot :
B)VS 2010 snapshot :
The Server software development kit (SDK) is integrated with the Microsoft 3.5 and Visual Studio 2008 and 2010 Help systems, and is accessible within the integrated development environment (IDE). See the following screen shot that shows the Library Reference section:
The Web ADF adds a set of context menus to assist in a project's development. Right-click a project in the Solution Explorer to define properties for a Web ADF project. The following describes the context menus and the resulting dialog boxes:
Add ArcGIS Reference—Manages ESRI specific assemblies available to a developer. Use this dialog box to add and remove references to assemblies in the project, and filter assemblies listed by component type (building block).
See the following screen shots that show the Add ArcGIS Reference option and the resulting Add ArcGIS Reference dialog box:
ArcGIS Toolbox Reference—Only valid for ArcObjects developers. ArcToolbox, included with ArcGIS Desktop products, can be used to create custom ArcGIS toolboxes that contain custom tools and models. The geoprocessing capabilities of ArcObjects define how ArcGIS Desktop, ArcGIS Engine, and ArcGIS Server products interact with the custom toolbox. In general, an ArcObjects GeoProcessor object is needed to work with the toolbox. Toolboxes can be published as geoprocessing services using ArcGIS Server. In this case, the service manages interaction with the GeoProcessor and a developer uses the IGPServer (ArcGIS Server ArcObjects application programming interface [API]) or GPServerProxy (ArcGIS Server Simple Object Access Protocol [SOAP] API).
A developer can also use the GeoProcessor directly to work with toolboxes. In this case, the toolbox is added to the GeoProcessor programmatically, tool or model parameters are set, the tool or model is executed, and a result is returned. The ArcGIS Toolbox Reference dialog box enhances the developer experience when working with a toolbox using the GeoProcessor. The dialog box uses a .tbx file to create a .NET wrapper class to use as a proxy for creating a tool or model instance. The native .NET class provides a constructor, IntelliSense, and intuitively named parameters to set values and process results. If you are working with ArcObjects locally, the local application process must have access to the .tbx file. When working with ArcObjects remotely via ArcGIS Server, the client application must have access to the .NET proxy class while the ArcGIS Server process (ArcSOC.exe) must have access to the .tbx file. You can have a client and server version of the .tbx file, but their content must match. Only the client application uses the .NET proxy class.
See the following screen shots that show the ArcGIS Toolbox Reference option and the resulting ArcGIS Toolbox Reference dialog box:
Add ArcGIS Identity—At design-time, the identity of the user running Visual Studio is used to connect to an ArcGIS Server local data source. At runtime, that identity is established by the Web application. Only one identity can be used to define access to all ArcGIS Server local data sources in a single Web application. This identity can be explicitly defined when building the Web ADF application in Visual Studio by using the Add ArcGIS Identity dialog box. Add the identity credentials that will be used to access ArcGIS Server local resources at runtime. This information will be added to the web.config file within a standard ASP.NET identity tag. If the "Encrypt identity in web.config" check box is selected, the identity tag will be encrypted; otherwise, the user name and password will be stored as clear text. This context menu is only available with Web projects.
See the following screen shots that show the Add ArcGIS Identity option and the resulting Add ArcGIS Identity dialog box:
This section describes some key characteristics of ASP.NET versions 2.0, 3.0, 3.5, and Visual Studio 2008 that can affect how you develop applications with the Web ADF.
Stand-alone class files are added and maintained in a project's App_Code directory. Upon compilation, classes in the App_Code directory are compiled into a single assembly and stored in a .NET Framework managed temporary location for the Web site (for example, C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\MyWebApp). Web application code associated with existing .aspx or .ascx files is compiled into a separate assembly and stored in the same temporary location.
By default, the position of controls added at design-time in visual studio 2008 or 2010 is not set. As a result, the controls are permitted to flow left-to-right on a line and top-to bottom on the page. Do the following to use absolute positioning as the default, which enables you to place controls at precise positions on the design view surface:
- Open VS2008 or 2010. Click on Tools menu and select Options to bring up the following window.
- Choose CSS Styling under the HTML Designer category.
- Check the option "Change positioning to the absolute for controls added using the Toolbox, paste, or drag and drop" check box to change the option when dragging and dropping controls.
- Click OK.
Controls added in new Web applications will use absolute positioning. When added, the controls snap to the 0,0 coordinate in the upper-left corner, but can be moved to the applicable location on the page.
See Also:Web controls
Customizing the Web Mapping Application