Thursday, August 15, 2013

MVC SAMPLE 5(Working with file upload )

File ->New ->Project


Select  the project Template


And Click on Ok
And go to controller Right click on it and select ADD Controller


Give the name of the controller


And then create a folder with name as   “Docs”




And paste any pdf file in Docs

And then go to Demo Controller and write the following Code



Here dotnetadvertising.pdf is the name of the file which is there is there in Docs Folder.


And then Right click on the screen and select Add View



And then run the Program
Demo: is the name of the controller
GetDoc  is the name of the method name


And then the file gets download automatically as


No comments:

Post a Comment

Thank you for visiting my blog

Kubernetes

Prerequisites We assume anyone who wants to understand Kubernetes should have an understating of how the Docker works, how the Docker images...