Browse by Tags

Related Posts

  • Handeling ModelBinders conversion errors

    L.S., I was wondering how it would be possible to handle the conversion errors of the ModelBinder and place them as an error in the ModelState. For instance when i create an action like: public ActionResult Create(int number, string name) { SomeDataModelObject dataObject = new SomeDataModelObject(number...
    Posted to ASP.NET MVC (Forum) by ChoKamir on 07-31-2009, 12:00 AM
    Filed under: MVC, exception, ModelBinder, Conversion
  • Business validation in custom model binder

    Hello all, I'm not sure what the best practice should be when dealing with custom model binders and validation. Currently, my custom model binders perform basic validate on my entities. For example, is the string length less than 'x' ... is the int between 1 and 31 ... is the email a valid...
    Posted to ASP.NET MVC (Forum) by webbarbarian on 10-05-2009, 12:00 AM
    Filed under: MVC, "ASP.NET MVC", Binders, asp.net mvc general, model binder, ModelBinder
  • Not All Properties Working With Default ModelBinder

    Given the following controller code: [ AcceptVerbs ( HttpVerbs . Post )] public ActionResult Edit ( int id , Actor actor ) { try { actorRepository . Save ( actor ); return RedirectToAction ( "Index" ); } catch { return View ( "Edit" ); } } I am trying to figure why a subset of the...
    Posted to ASP.NET MVC (Forum) by Kevin Stevens on 11-01-2009, 12:00 AM
    Filed under: MVC, ModelBinder
Page 1 of 1 (3 items)