Why define the target control on the model class?

Apr 15, 2014 at 4:09 PM
I am looking at doing a model binder for webforms, and I was wondering what the thinking and logic was behind putting the attribute to define the target control on to the data classes.

I am tempted to do it the other way around - like in ASP.NET MVC - put the logic of what data field to bind to onto the ASP.NET control in ASPX markup. I was thinking about using the HTML5 "data-....." attributes for that.

Any particular reason why you chose to do it the other way around?