File Upload asp.net core

Create a project in VS2015.

01.File->New->Project->asp.netcore web application

02.Now we have to Store all the default information like file upload and their path in wwwroot.

wwwroot is new in asp.net core.It is used for all the .css,.js and other file except code base .So the outside there is a code with in .cs file and other asp.net file for seperation of concern.

Now got to appsettings.json and write

#appsettings.json

In Startup.cs file you need to register the dependency in ConfigureServices
#startup

#AjaxFileUpload.cshtml

#controller

I have made my default view in SatrtUp.cs

#file with other text in ajax

add

and

in controller

Leave a Reply

Your email address will not be published. Required fields are marked *