ComponentOne Upload for ASP.NET WebForms
Quick Start / Step 1 of 4: Create the Project and add C1Upload
In This Topic
    Step 1 of 4: Create the Project and add C1Upload
    In This Topic
    1. Create a new ASP.NET Web site.
    2. Click the Design tab to enter the Design view.
    3. In the Visual Studio Toolbox, double-click the C1Upload icon to add the control to your page.
      The C1Upload control gets registered in web.config file.      
      Note: If your project is hosted on a server, you may need to register your control manually in the <system.web> node of your web.config file.

      If you need to register your control manually, follow the steps below.

      1. Open the Web.config file located in your Source Explorer.
      2. If the following markup does not appear in the <system.web> node, add the following markup to your file:
        HTML
        Copy Code
        <httpHandlers>
        <add path="C1UploadProgress.axd" verb="*" type="C1.Web.Wijmo.Controls.C1Upload.UploadProgressHandler,C1.Web.Wijmo.Controls.4" />
        </httpHandlers>
        <httpModules>
        <add name="C1UploadModule" type="C1.Web.Wijmo.Controls.C1Upload.UploadModule,C1.Web.Wijmo.Controls.4" />
        </httpModules>
        <compilation debug="true" targetFramework="4.0">
        <assemblies>
        <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
        <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
        </assemblies>
        </compilation>
        
      3. Add the following additional markup in the  <system.webServer> node:

        HTML
        Copy Code
        <system.webServer>
        <validation validateIntegratedModeConfiguration="false"/>
        <modules>
        <add name="C1UploadModule" type="C1.Web.Wijmo.Controls.C1Upload.UploadModule,C1.Web.Wijmo.Controls.4" />
        </modules>
        <handlers>
        <add name="C1UploadProgress" path="C1UploadProgress.axd" verb="*" type="C1.Web.Wijmo.Controls.C1Upload.UploadProgressHandler,C1.Web.Wijmo.Controls.4" />
        </handlers>
        </system.webServer>
        

        This markup is required as the project is hosted on a server.

    4. Select the C1Upload control on the page and in the Properties window, set the MaximumFiles property to "5" to allow five files to be uploaded at one time.

    Step 1 of 4 Completed

    In this step, you created an ASP.NET Web site. You also added the configuration items for C1Upload to the web.config file and set the number of files that can be uploaded at one time. In the next step, you will  use the totalComplete client-side event to show an alert dialog box when all files have been uploaded.

    See Also