- ASP.NET MVC 2 Cookbook
- Andrew Siemer, Richard Kimber
- 212字
- 2021-04-09 22:44:25
In this chapter, we will cover:
- Exposing JSON using a JsonResult with Json.NET
- Creating custom action result to return an image
- Constraining an image's size from an ImageResult
- Creating a CAPTCHA system
- Generating a PDF order summary
- Implementing a controller factory for use with
StructureMap
This chapter is all about the controller—a very important ingredient to the Model View Controller recipe. In this chapter, we will take a look at a few things that can be done with actions and the controllers that host them. We will take a look at some flexibility that is now provided in .NET 4 with optional parameters. Next, we will create a custom action that exposes JSON. After that we will look at how to return image data from an action. With that under our belt, we will implement an action that not only returns an image, but is also able to constrain the sizes of that image. This will be followed by building an image-based CAPTCHA system. Next, we will implement an action that returns a PDF. And lastly, we will take a look at how to implement a controller factory for use with an Inversion of Control (IoC) product, such as StructureMap
.
- UG NX 12.0中文版完全自學一本通
- AJAX and PHP: Building Modern Web Applications 2nd Edition
- Creo 6.0快速入門、進階與精通(升級版)
- Photoshop CC中文版基礎與實例教程(第7版)
- Flash CC動畫制作案例教程
- 中文版CorelDRAW X8基礎培訓教程(全彩版)
- 零基礎學數碼攝影后期
- BackTrack 5 Wireless Penetration Testing Beginner's Guide
- CMS Design Using PHP and jQuery
- Photoshop CS6標準教程(全視頻微課版)
- UG NX 9中文版從入門到精通
- SolidWorks 2020中文版從入門到精通
- Professional Azure SQL Database Administration
- Plone 3 Theming
- AutoCAD 2019中文版完全自學手冊(標準版)