MVC5 Classic
Upload a File

This scenario allows a user to upload a file using the wijupload and wijdialog widgets. The following section describes how to upload a file to a folder using wijfileexplorer, wijdialog and wijupload.

Along with the first web handler fileexplorer.ashx, the example in this topic requires another web hander file upload.ashx, that can be copied from the drop-down below:

upload.ashx

In Source View

Complete the following steps:

  1. Navigate to the Solution Explorer, expand the Shared folder inside the Views folder, and double-click _Layout to open the file.
  2. Ensure that the following links to the dependencies are added within the <head></head> tags.

    References

  3. Add the following script that allows the user to upload a file using wijupload and wijfileexplorer widgets, between the <head></head> tags.

    Script

  4. Add the following markup within the <body></body> tags of the page, just after @RenderBody():

    Markup

  5. Press F5 to run the project.

What You've Accomplished

 When you run the project, select a folder and click the Upload button that appears in the toolbox.

The wijupload widget appears that lets you browse for files that you can upload to the selected folder.

 

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum |  Documentation Feedback