Model Binding not working

后端 未结 10 1444
别那么骄傲
别那么骄傲 2021-02-06 01:52

I have the following POCO classes:

public class Location
    {
        public int LocationId { get; set; }
        public string Name { get; set; }
        publi         


        
10条回答
  •  梦谈多话
    2021-02-06 02:03

    And another reason: Normally I use the built in editors or displays for and would have never encountered this issue. However in this case I required a semi-custom control. Basically a drop down with lots of data attributes on the options.

    What I was doing, for my select tag was:

    
    

    NameFor fixed all my issues.

提交回复
热议问题