'column1'有一个SelectedValue,它是无效的,因为它在项目列表中不存在。参数名称:value [英] 'column1' has a SelectedValue which is invalid because it does not exist in the list of items. Parameter name: value

查看:111
本文介绍了'column1'有一个SelectedValue,它是无效的,因为它在项目列表中不存在。参数名称:value的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有一个用于保存地址的文本框,但现在它被替换为asp.net中的dropdownlist。

将前一条记录与下拉列表绑定。它给出以下错误: -

 '  column1' 有一个SelectedValue, 无效,因为它存在  项目的列表。 
参数名称:value





即标记

 <   td    样式  =  text-align:left >  
< asp:DropDownList < span class =code-attribute> ID = column1 AutoPostBack = true runat = server 样式 = width: 250px

< span class =code-attribute> OnSelectedIndexChanged = column1_SelectedIndexChanged OnDataBound = column1_DataBound >
< / asp:DropDownList >
< / td >



现在如何解决?

决方案
其中是您的代码值字段。尝试在代码中写入datatext字段和数据值字段。


Hi Everyone,
I had a textbox for saving address but now its being replaced with dropdownlist in asp.net.
While binding the previous record with the dropdownlist.It gives the following error:-

'column1' has a SelectedValue which is invalid because it does not exist in the list of items.
Parameter name: value



thats the markup

<td style="text-align: left">
                        <asp:DropDownList ID="column1" AutoPostBack="true" runat="server" Style="width: 250px"

                            OnSelectedIndexChanged="column1_SelectedIndexChanged" OnDataBound="column1_DataBound">
                        </asp:DropDownList>
                    </td>


How an it be resolved now?

解决方案

where is the value field on your code. try and write datatext filed and data value field on your code.


这篇关于'column1'有一个SelectedValue,它是无效的,因为它在项目列表中不存在。参数名称:value的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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