Create Features from Shapefile

This sample illustrates how to use the ArcGISWebClient class to post multi-part content (e.g. file) to a service\operation. The ArcGISWebClient.PostMultipartAsync method supports providing a dictionary of parameter values as string-value pairs, and an IEnumerable of StreamContent. Use StreamContent to define the name, filename, content type, and the stream with content. This sample also demonstrates how to use the ArcGIS Portal REST API to generate features from a shapefile (http://www.arcgis.com/apidocs/rest/generate.html).

Download Sample Application
XAML C# VB.NET
<UserControl x:Class="ArcGISWPFSDK.GenerateFeatures"
   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:esri="http://schemas.esri.com/arcgis/client/2009">

    <Grid x:Name="LayoutRoot" Background="White">

        <esri:Map x:Name="MyMap" Extent="-15000000,2000000,-7000000,8000000" WrapAround="True" >
            <esri:ArcGISTiledMapServiceLayer ID="StreetMapLayer" 
                      Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/>
        </esri:Map>

        <esri:MapProgressBar x:Name="MyProgressBar" 
			Map="{Binding ElementName=MyMap}"
			HorizontalAlignment="Center" VerticalAlignment="Bottom"
			Width="200" Height="36"
			Margin="25"  />

        <Border HorizontalAlignment="Right" Background="White" VerticalAlignment="Top" 
                Margin="15" MinHeight="80" 
                BorderBrush="Black" BorderThickness="1">
            <Border.Effect>
                <DropShadowEffect/>
            </Border.Effect>
            <StackPanel Orientation="Vertical" HorizontalAlignment="Center" Margin="5" >
                <TextBlock FontSize="12" HorizontalAlignment="Center" >
                    Add a zipped shapefile to Map.<LineBreak/>
                    Note:- Include no more than 1,000 <LineBreak/>shapefile features in your file.
                </TextBlock>
                <Button x:Name="BrowseButton" Content="Browse for file" Width="150" Margin="5" 
                        HorizontalAlignment="Center" Click="BrowseButton_Click" />
                <Button Content="Clear Map" Width="150" Click="Button_ClearMap" Margin="5"/>
            </StackPanel>
        </Border>

    </Grid>
</UserControl>
Sample code usage restrictions
5/16/2014