custom-model-binder Questions
1
Solved
I have a Web API 2 project and an other project, in which I have my Model classes and a BaseModel that is a base for all Models, as following,
public class BaseModel
{
public string UserId { get; ...
Tristantristas asked 31/12, 2013 at 9:41
1
Solved
I would like my model binding to be case insensitive.
I tried manipulating a custom model binder inheriting from System.web.Mvc.DefaultModelBinder, but I can't figure out where to add case insensi...
Elainaelaine asked 24/10, 2013 at 10:7
1
Solved
My team needs to develop a framework for our company and products using this framework.
One of the requisites is that a product could be customized for a specific client, yet it should be easily u...
Romish asked 15/6, 2013 at 0:28
1
Solved
im stuck with this very strange problem.
i have an API Controller named AttendanceController derived from APIControllerFA which is inturn derived from ApiController
here is the code
public class A...
Catalog asked 10/12, 2012 at 17:23
3
Solved
I'm using NInject with NInject.Web.Mvc.
To start with, I've created a simple test project in which I want an instance of IPostRepository to be shared between a controller and a custom model binder...
Kearse asked 8/2, 2012 at 1:18
1
Solved
I see examples all over the net of people setting up their custom model binders like this:
// global.asax
protected void Application_Start()
{
ModelBinders.Binders.Add(typeof(YourModel), new Your...
Hollister asked 24/8, 2012 at 15:5
2
Solved
I am trying to find some examples of building a custom model binder for a unique binding scenario I need to handle, but all of the articles I found were for older versions of MVC which are no longe...
Teutonic asked 26/2, 2010 at 18:30
3
Solved
I'm sure someone has asked this before, but I'm struggling to find where.
I'm using Ninject to remove dependencies from my controllers, along with a repository design pattern.
As I understand it,...
Magulac asked 8/11, 2011 at 10:34
1
Solved
In my project I want to allow users input double values in 2 formats: with using ',' or '.' as delimiter (I'm not interested in exponential form). By default value with delimiter '.' don't work.
I ...
Fifine asked 29/6, 2011 at 11:36
3
Solved
I'm scratching my head a bit at how model binders do their work in ASP.Net MVC.
To be specific, the BindModel() method has a ModelBindingContext parameter that holds the model name and type, but ...
Ernaline asked 19/8, 2010 at 16:6
2
Solved
I have a custom struct called TimeOfDay which is used in a view model like this:
public class MyViewModel
{
public TimeOfDay TimeOfDay { get; set; }
}
I have created a custom model binder calle...
Tatting asked 3/4, 2011 at 23:20
1
Solved
I'm using ASP.NET MVC 3 RTM, and I have a view model like this:
public class TaskModel
{
// Lot's of normal properties like int, string, datetime etc.
public TimeOfDay TimeOfDay { get; set; }
}
...
Superposition asked 3/4, 2011 at 22:53
2
The default model binder is returning errors for properties that are of type double when my application is being used in countries that use different number formatting for decimals (e.g. 1.2 = 1,2)...
Aromatic asked 19/2, 2011 at 12:0
1
Solved
i've created my own custom model binder to handle a Section DropDownList defined in my view as:
Html.DropDownListFor(m => m.Category.Section, new SelectList(Model.Sections, "SectionID", "Sectio...
Degauss asked 4/9, 2010 at 15:30
3
Solved
Let's say I have an User entity and I would want to set it's CreationTime property in the constructor to DateTime.Now. But being a unit test adopter I don't want to access DateTime.Now directly but...
Linet asked 24/5, 2010 at 19:30
2
Solved
I have created a new ActionFilter for an ASP.NET MVC application that I'm creating. I have an action which accepts an Http Post and the argument of the action method accepts an object, for which I ...
Gybe asked 15/3, 2010 at 3:39
© 2022 - 2024 — McMap. All rights reserved.