The examples in this section demonstrate how to use ABCUpload .NET. They take you through from the most basic of uploads to a full featured upload with progress bar. The structure of the HTML and ASPX pages is designed to be as simple and modular as possible to avoid distracting from the basic functionality.

The modularity of the code means that you can just copy individual pages and insert them into your own projects. Note that you will also need to make changes to your web.config file.

For full integration with ASP.NET you may wish to re-implement the pages using more sophisticated techniques such as code-behind files and data binding.

 

   
web
 
web.config    
     

This is a minimal example of the web.config file required for ABCUpload .NET. For further information see the web.config and ABCUpload config sections of this document.

[C#]
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.web>

    <!-- HTTP MODULES
    The ABCUpload Progress Module is core to
    many features of ABCUpload.
    It intercepts requests and processes them
    appropriately. The Progress Module supplies
    the functionality for the Pure HTML Progress
    Bar, GigUpload and Corruption Autofix.
    If the progress module is not installed
    these features will not be available.
    -->
    <httpModules>
      <add name="Progress" type="WebSupergoo.ABCUpload6.ProgressModule, ABCUpload6, Version=6.0.0.0, Culture=neutral, PublicKeyToken=572826f585f78c3a"/>
    </httpModules>

    <!-- HTTP RUNTIME
    ASP.NET uses a maximum upload size set to
    a default designed to prevent Denial of
    Service (DOS) attacks. Here we increase
    the maximum request size to 1 GB.
    -->
    <httpRuntime
      maxRequestLength="1048576"
      executionTimeout="600"
    />

    <!-- COMPILATION
    Because we will be creating objects based
    on classes within the ABCUpload .NET assembly
    we need to reference the assembly within our
    config file. This is not necessary if the
    assembly is installed in the bin directory
    rather than the Global Assembly Cache (GAC).
    -->
    <compilation defaultLanguage="c#">
      <assemblies>
        <add assembly="ABCUpload6, Version=6.0.0.0, Culture=neutral, PublicKeyToken=572826f585f78c3a" />
      </assemblies>
    </compilation>

  </system.web>
</configuration>

[VB]
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.web>

    <!-- HTTP MODULES
    The ABCUpload Progress Module is core to
    many features of ABCUpload.
    It intercepts requests and processes them
    appropriately. The Progress Module supplies
    the functionality for the Pure HTML Progress
    Bar, GigUpload and Corruption Autofix.
    If the progress module is not installed
    these features will not be available.
    -->
    <httpModules>
      <add name="Progress" type="WebSupergoo.ABCUpload6.ProgressModule, ABCUpload6, Version=6.0.0.0, Culture=neutral, PublicKeyToken=572826f585f78c3a"/>
    </httpModules>

    <!-- HTTP RUNTIME
    ASP.NET uses a maximum upload size set to
    a default designed to prevent Denial of
    Service (DOS) attacks. Here we increase
    the maximum request size to 1 GB.
    -->
    <httpRuntime
      maxRequestLength="1048576"
      executionTimeout="600"
    />

    <!-- COMPILATION
    Because we will be creating objects based
    on classes within the ABCUpload .NET assembly
    we need to reference the assembly within our
    config file. This is not necessary if the
    assembly is installed in the bin directory
    rather than the Global Assembly Cache (GAC).
    -->
    <compilation defaultLanguage="vb">
      <assemblies>
        <add assembly="ABCUpload6, Version=6.0.0.0, Culture=neutral, PublicKeyToken=572826f585f78c3a" />
      </assemblies>
    </compilation>

  </system.web>
</configuration>