Thursday, August 15, 2013

MVC Sample 9

File->New->Project




And click on Ok Button


And 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 go to controller Demo Controller and write the following Code

 And right click on the page and Select Add View





And write the following code in View


And run the program
Demo: is the name of the Controller
And the output screen




MVC Sample Creating Views with Strong Type

File->New ->Project



And click on Ok


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




Give the name of the controller




And Go to Model Folder and Create a New Class with the name Job and write the following CoDE

and go to controller and right the following code


And right click on the controller page and add view





A page will displayed with the method name as showdata

 And click on Add and write the following Code





And run the program
Demo: Controller Name


ShowData: is the method name



MVC Sample 7(Creating View with Weak Type)

File->new->project



And click on ok


And select the project Template



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





Give the name of the controller as Data and write the following code


Right click on the model folder and create a class with name Job





And write the following code in Job class




And then go to view and write the following code
 And run the program




MVC Sample Working with Json.

File ->New->Project






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




Give the name of the controller



And go to DemoController


And write the following Code

And right click and select Add View



And run the program and see the output
Demo: Is the name of the controller


GetData: is the method name




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


Kubernetes

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