Thoughts on validation in ASP.NET MVC applications(blog.codeville.net)

submitted by LordLord(3737) 3 years, 8 months ago

MVC Preview 5 comes with two new API pieces that seem relevant to validation: ModelState. Controllers now have an official way to pass validation error information to views. Populate ViewData.ModelState, then you can use the built-in HTML helpers to render error message summaries, and to highlight input fields that correspond to errors. Model binders. Controllers are expected to populate model objects from form posts using the IModelBinder API. You can create custom binders - the framework calls your binder to obtain a value for each model property. (If you don’t understand this, don’t worry - it turns out not to be relevant.)

add a comment |category: |Views: 17

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

No comments so far

information Login or create an account to comment on this story