dataBinding:'System.String'不包含名为'PlantId'的属性。 [英] dataBinding: 'System.String' does not contain a property with the name 'PlantId'.

查看:52
本文介绍了dataBinding:'System.String'不包含名为'PlantId'的属性。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

@ Html.DropDownListFor(u => u.PlantId,new SelectList(configuration_utility.Models.User.getAllplant(),PlantId,PlantName,2),new {style =width:310px})plz帮帮我?

@Html.DropDownListFor(u => u.PlantId, new SelectList( configuration_utility.Models.User.getAllplant(),"PlantId","PlantName", 2), new { style = "width:310px" }) plz help me?

推荐答案

这里你代表你的模型,检查你的模型是否包含PlantId的属性!! ,还要检查你是否用其他变量声明了你的模型,因为如果是u => u.PlantId你不需要声明你的模型
Here "u" represents your model, check whether your model contains a property for "PlantId"!!, also check if you have declared your model with some other variable or not, because in case of u=>u.PlantId you doen't need to declare your Model


这篇关于dataBinding:'System.String'不包含名为'PlantId'的属性。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆