This documentation is for the old version. Go to the latest Upload Suite docs

Configuring Image Uploader ASP.NET Control

The Inserting Image Uploader ASP.NET Control into ASP.NET Page article familiarizes you with Image Uploader ASP.NET control. Now you know how to add the control to a page and can create a simple web application which prepares a downsized copy of the user-specified image client-side, sends it along with this image, and saves both of them on a server. In the present topic we will discuss more specific tasks of Image Uploader ASP.NET control usage which were not mentioned in the previous article.

Adding License Key

According to Aurigma licensing policy Image Uploader requires license keys. There are two license key types: trial and full. A trial license key, as it is discussed in the How to Evaluate Image Uploader topic, allows evaluating Image Uploader on any domain (not only on localhost). Full license key removes limitations of the evaluation version and allows using the control on a domain name or IP address Image Uploader is purchased for. Find the detailed information about full license keys and licensing options in the Removing Limitations of Evaluation Version topic.

To add a license key to the list of Image Uploader parameters just type it in the LicenseKey property value box. These changes will be reflected in a source code as follows:

ASP.NET
<cc1:ImageUploader ID="ImageUploader1" runat="server" 
        height="400" width="600"
        LicenseKey="XXXXX-XXXXX-XXXXX-XXXXX-XXXXX;YYYYY-YYYYY-YYYYY-YYYYY-YYYYY">
</cc1:ImageUploader>
Note

If you have several keys, they should be separated with semicolons.

Enabling or Disabling ActiveX or Java Versions

Image Uploader includes two versions, namely ActiveX control and Java applet. By default, both these versions are enabled and used in accordance with a browser type. However, if you purchased a license for one version only, you should disable another one. To perform this set the ActiveXControlEnabled or JavaAppletEnabled properties of Image Uploader ASP.NET control correspondingly to false.

ASP.NET
<cc1:ImageUploader ID="ImageUploader1" runat="server" 
        height="400" width="600"
        ActiveXControlEnabled="True" JavaAppletEnabled="False">
</cc1:ImageUploader>

Configuring and Using Installation Progress

Image Uploader ASP.NET control allows displaying special instructions helping users to download and install Image Uploader. This feature is called installation progress. The detailed information on this feature is provided in the Using Image Uploader Installation Progress topic. Here we will briefly consider how to enable and customize this functionality in Image Uploader ASP.NET control.

Image Uploader ASP.NET control provides the InstallationProgress class which includes a number of properties intended to configure downloading and installation instructions and information. For example, the Visible property specifies whether to display this information while the ActiveX control or Java applet is being downloaded and installed. CommonHtml in its order contains HTML-marked description of Image Uploader displayed on the page instead of the ActiveX control before it is completely installed and initialized. The other properties correspond to the ones described in the Using Image Uploader Installation Progress topic. The following code sample illustrates how to configure installation progress in the ASP.NET control.

ASP.NET
<head runat="server">
    <title>My Web Site</title>
</head>
<body>
    <form id="form1" runat="server">
        <cc1:ImageUploader ID="ImageUploader1" runat="server" 
            height="400" width="600">
            <InstallationProgress 
                Visible="True"
                CommonHtml="&lt;p&gt;Aurigma Image Uploader ActiveX control is necessary to upload your files quickly and 
                    easily. You will be able to select multiple images in user-friendly interface instead of clumsy input 
                    fields with &lt;strong&gt;Browse&lt;/strong&gt; button.&lt;/p&gt;" 
                
                ProgressHtml="&lt;p&gt;&lt;img src=&quot;{0}&quot; /&gt;&lt;br /&gt;Loading Aurigma Image Uploader 
                    ActiveX...&lt;/p&gt;" 
                JavaProgressHtml="&lt;p&gt;&lt;img src=&quot;{0}\&quot; /&gt;&lt;br /&gt;Loading Aurigma Image Uploader 
                    Java Applet...&lt;/p&gt;"
                ProgressImageUrl="mywaitIndicator.gif"
                
                CommonInstallJavaHtml="&lt;p&gt;You need to install Java for running Image Uploader.&lt;/p&gt;"
                IE7InstructionsHtml="&lt;p&gt;To install Image Uploader, please click on the 
                    &lt;strong&gt;Information Bar&lt;/strong&gt; and select &lt;strong&gt;Install ActiveX Control&lt;/strong&gt;
                    or &lt;strong&gt;Run ActiveX Control&lt;/strong&gt; from the dropdown menu.&lt;/p&gt;&lt;p&gt;Then either 
                    click &lt;strong&gt;Run&lt;/strong&gt; or after page reload click &lt;strong&gt;Install&lt;/strong&gt; 
                    when you see the control installation dialog. If you don't see Information Bar, please try to reload the 
                    page and/or check your security settings.&lt;/p&gt;" 
                IE7InstallJavaHtml="&lt;p&gt;To install Java, please click on the 
                    &lt;strong&gt;Information Bar&lt;/strong&gt; and select  &lt;strong&gt;Install ActiveX Control&lt;/strong&gt; 
                    or&lt;strong&gt;Run ActiveX Control&lt;/strong&gt; from the dropdown menu.&lt;/p&gt;&lt;p&gt;Then either 
                    click &lt;strong&gt;Run&lt;/strong&gt; or after the page reload click &lt;strong&gt;Install&lt;/strong&gt;  
                    when you see the control installation dialog. If you don't see Information Bar, please try to reload the 
                    page and/or check your security settings.&lt;/p&gt;"
             />
        </cc1:ImageUploader>     
    </form>
</body>

Preserving Sessions and Authentication Tickets Passed in Cookies

In the case when your web application uses cookies for keeping session or authentication information Image Uploader ASP.NET control automatically passes this information to the upload request. So you do not need to care about keeping your cookies saved when server upload script is called. However, if necessary, you can disable automatic cookie preservation by specifying the PreserveHttpCookies property to false.

See Also

Manual