PageRenderTime 25ms CodeModel.GetById 0ms RepoModel.GetById 1ms app.codeStats 0ms

/Visual Studio 2008/CSASPNETMVCCustomActionFilter/ReadMe.txt

#
Plain Text | 68 lines | 41 code | 27 blank | 0 comment | 0 complexity | aca14150d0b8c83437d175054ec5c48b MD5 | raw file
  1. ========================================================================
  2. ASP.NET MVC APPLICATION : CSASPNETMVCCustomActionFilter Project Overview
  3. ========================================================================
  4. /////////////////////////////////////////////////////////////////////////////
  5. Use:
  6. The CSASPNETMVCCustomActionFilter sample demonstrates how to use C# codes
  7. to create custom ActionFilters for ASP.NET MVC web application. In this
  8. sample, there are two custom ActionFilters, one is used for customizing
  9. ViewData before page view result get executed and rendered; another is
  10. used for perform logging within the various events during the processing
  11. of custom ActionFilters.
  12. /////////////////////////////////////////////////////////////////////////////
  13. Prerequisite:
  14. Visual Studio 2008 SP1 with ASP.NET MVC 1.0 extension installed.
  15. *ASP.NET MVC 1.0 RTM download:
  16. http://www.microsoft.com/downloads/details.aspx?FamilyID=53289097-73ce-43bf-b6a6-35e00103cb4b&displaylang=en
  17. /////////////////////////////////////////////////////////////////////////////
  18. How to Run:
  19. *open the project
  20. *select default.aspx page and view it in browser
  21. *in the main page UI, the message data(modified by ActionFilter) is displayed
  22. *click the "About" tab, the About page will be displayed, this will trigger
  23. the Logging ActionFilter which will log events into the specified log file.
  24. /////////////////////////////////////////////////////////////////////////////
  25. Key components:
  26. *web.config file: contains all the necessary configuration information
  27. of this web application
  28. *global.asax: contains all the URL routing rules
  29. *HomeController class: contains the main application
  30. navigation logic(such as default page and about page)
  31. *Home Views: the page UI elements for HomeController
  32. *shared Views & Site.Master: those UI elements shared by all page UI
  33. *MessageModifierActionFilter: this is one of the custom ActionFilters which
  34. is used for intercepting the ActionResult execution and modify the ViewData
  35. *TextLogActionFilter: this is another ActionFilter which is used to log some
  36. info during the various events of ActionResult execution.
  37. /////////////////////////////////////////////////////////////////////////////
  38. References:
  39. #ASP.NET MVC Tutorials
  40. http://www.asp.net/Learn/mvc/
  41. /////////////////////////////////////////////////////////////////////////////