How to download the GP executed result?

2398
5
11-29-2011 01:23 PM
weiliang
New Contributor II
Hi,

I want to build a GP service to allow the end user zip several selected shapefile on the fly and download the zip file afterwards. The problem is that what the Parameters should I reference the OutPut parameter to in the ArcToolBox property tab??a Record Set??Also, after GP service execution, the result in the code is a GPParameter object, but what will be the exact object type for the GP output in C# code?  How can I link the result object in C# to a hyperlink button or how to automatically popup a download dialog box when the zip file is ready?

Thanks,

Wei
0 Kudos
5 Replies
DominiqueBroux
Esri Frequent Contributor
In this thread, Rex references samples and resources available online to assist you with consuming geoprocessing services.
0 Kudos
weiliang
New Contributor II
Thanks for your reply, Dominique. However, the thread you mentioned doesn't answer my question. What I want is after zip file returned from GP service in C#, how can I use this returned zip object and link it to a hyperlink button? Also, which OutPut Parameter type should I use in the ArcToolBox property tab?

Wei
0 Kudos
weiliang
New Contributor II
Can somebody kindly help me on this issue?

Thanks,

Wei
0 Kudos
DianeWhited
New Contributor
The output parameter in toolbox should be set to data type File.
0 Kudos
JenniferNery
Esri Regular Contributor
Once the output is of type GPDataFile.

You can have the following XAML-code:
        <HyperlinkButton x:Name="link" Content="{Binding Name}" 
                         NavigateUri="{Binding Url}"
                         VerticalAlignment="Top" HorizontalAlignment="Center"/>



link.DataContext = gpParameter as GPDataFile;
0 Kudos