A HttpModule for ASP.NET MVC developers who are concerned using Server Controls in your MVC projects. This will free you to use Server Controls without worry. This project utilize the Response.Filter property to achieve the goal.
Who should use this module
If you need to use ASP.NET build-in server controls in your ASP.NET MVC view page, you possibly will cause some trouble. Such as "Validation of viewstate MAC failed" exception occured when doing PostBack. Even you disable all the ViewStates in any
place such as web.config or in page. You still will cause this exception if you do applying a ViewMasterPage. For this situation, you may need to use this HttpModule.
How to use
- Ability to remove all the ViewState-related hidden fields in the page. This could avoid any of the WebForm validation restriction.
- Ability to rename the Server Control generated "name" field that strip the Naming Container appended parts. That means whatever your set your control's ID, the "name" attribute will appear AS IS.
- Add "MvcFriendlyModule.dll" into your project reference.
- Add this module into your "web.config" under your application root
Bug fix / Feature Request / Improvements
- I'm quite sure that there is much to improve, so if anyone has any ideas for bug fix / feature requests / improvements. I'll be happy to hear. Please drop your notes in the