asp.net mvc - MVC Model Binding Confusion -


I am not using "model binding" in my MVC application - that is, I have not tried this Form of "Mapping" form for one or more classes in the Action Parameters list, which is described in many places. Instead, I send parameters for each person's form field, or use the formclasses.

I was thinking that I would like to try it, but I am confused about the basic premise. It seems that you use the same model for your "binding" (from the scene to the controller) that you use for your viewold (to see with the controller). (I'm using strongly typed ideas for each scene with a separate view modal.)

Still, I think the needs of my thoughts differ greatly from the needs of my action For example, for example, many selectors may be required from which the user can choose. However, the action needs to be done to know which item the user has chosen, not every option in every list.

Is it really to use the same class going in both directions?

For example, here's my one visual model class:

  public class interviewer selected list {public selection list interviewer list {received; Set; } PUBLIC CLIENT SECTOR LIST DISTRICT FILTER LISTS {Get; Set; } Public School Displaysist Info School List Dissepless {get; Set; } Public long-term interfaith ID {receive; Set; } Received public string {interferrine selected { Set; } Public string selected SITEID {get; Set; } Need Public Child inventory {receive; Set; } Need Public Hair {Receive Client Selection List}; Set; }}  

(plus there are some methods, etc.)

This square is required to look, but not all of the action is needed - that is, the interviewer's list , District filter list, needs interview list, etc. I think my question is: If I had to write a custom model binder to bind this class, then I would have to recreate the whole class in the model binder, in which the selection list, from which the content comes from the database, when Do I really need everyone that user has chosen? Or can I set all prices from the current example of this class, which was sent from the view to the model binder?

Sorry if this is incompatible ... I do not remember anything here, I can help! :)

I would like to recreate those properties which are understood on model binders. There is a huge overhead to populate the SelectListItems from DB if the value of the property will not be used (as is usually the case) unless there is no server-side error, in this situation you will be able to recreate the entire view modal Will be required - Display the view.


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -