'CBLservicetype'有一个SelectedValue,它是无效的,因为它在项目列表中不存在。参数名称:value [英] 'CBLservicetype' has a SelectedValue which is invalid because it does not exist in the list of items. Parameter name: value
本文介绍了'CBLservicetype'有一个SelectedValue,它是无效的,因为它在项目列表中不存在。参数名称:value的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这里我使用的是清单框但是当我运行程序时出现错误.....
这里我的保存代码是...
cmd.Parameters.AddWithValue(@ servicetype,STservice.ToString());
清单代码......
here i am using checklist box but when i run the program i got error.....
here my save code is...
cmd.Parameters.AddWithValue("@servicetype",STservice.ToString());
checklist code...
STservice = string.Empty;
foreach (ListItem item in this.CBLservicetype.Items)
if (item.Selected)
STservice += item + ", ";
如果您找到任何解决方案,请帮助我...谢谢
If u find any solution kindly help me... thank you
推荐答案
您好,
它应该是
Hi,
It should be
item.Value + " "
或
or
item.Text + ", "
根据您的要求。
不是以下一个。
based on your requirement.
Not the below one.
item + ", "
问候,
RelicV
Regards,
RelicV
这篇关于'CBLservicetype'有一个SelectedValue,它是无效的,因为它在项目列表中不存在。参数名称:value的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文