简体   繁体   English

不存在从对象类型System.Web.UI.WebControls.ListItem到具有下拉列表的已知托管提供程序本机类型的映射

[英]No mapping exists from object type System.Web.UI.WebControls.ListItem to a known managed provider native type with dropdown

Error occurs when I execute with following parameter 使用以下参数执行时发生错误

hobj.Add("@ItemPublisher", ddlPublisher.SelectedItem);

I've tried SelectedItem , SelectedValue and SelectedIndex , but it didn't work. 我尝试了SelectedItemSelectedValueSelectedIndex ,但是没有用。 Any solution? 有什么办法吗?

从您的字段名称中删除“ @”,并在SelectedItem的位置使用Value。

hobj.Add("ItemPublisher", ddlPublisher.Value);

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从对象类型System.Web.UI.WebControls.ListItem到已知托管提供程序本机类型的映射不存在 - No mapping exists from object type System.Web.UI.WebControls.ListItem to a known managed provider native type 从对象类型System.Web.UI.WebControls.GridViewRow到已知托管提供程序本机类型的映射不存在 - No mapping exists from object type System.Web.UI.WebControls.GridViewRow to a known managed provider native type 从对象类型System.Web.UI.WebControls.DropDownList到已知的托管提供程序本机类型没有映射 - No mapping exists from object type System.Web.UI.WebControls.DropDownList to a known managed provider native type 不存在从对象类型 System.Web.UI.WebControls.TextBox 到已知托管提供程序本机类型的映射 - No mapping exists from object type System.Web.UI.WebControls.TextBox to a known managed provider native type 对象类型System.Web.UI.WebControls.ListItem没有映射 - No mapping exists from object type System.Web.UI.WebControls.ListItem 错误:从对象类型System.Web.UI.WebControls.TextBox到已知的托管提供程序本机类型的映射不存在 - ERROR: No mapping exists from object type System.Web.UI.WebControls.TextBox to a known managed provider native type C# 不存在从对象类型 System.Web.UI.WebControls.TextBox 到已知托管提供程序本机类型的映射 - C# No mapping exists from object type System.Web.UI.WebControls.TextBox to a known managed provider native type 无法将类型为“ System.Web.UI.WebControls.ListItem”的对象转换为类型为“ System.IConvertible”的对象 - Unable to cast object of type 'System.Web.UI.WebControls.ListItem' to type 'System.IConvertible' 无法将“System.String”类型的对象转换为“System.Web.UI.WebControls.ListItem”类型 - Unable to cast object of type 'System.String' to type 'System.Web.UI.WebControls.ListItem 无法将类型为“ System.Web.UI.WebControls.ListItem”的对象转换为类型为“ System.String”的对象 - Unable to cast object of type 'System.Web.UI.WebControls.ListItem' to type 'System.String'
相关标签
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM