在ddl中的文本更改事件填充数据 [英] on text change event fill data in ddl

查看:56
本文介绍了在ddl中的文本更改事件填充数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个文本框和一个下拉列表。当我调用文本框更改事件时,数据将填入下拉列表中。当我再次调用文本框更改事件,然后在下拉列表中,先前和新数据将添加到下拉列表中。我只希望新的数据被添加在下拉列表和prvious记录的删除意味着新的记录覆盖下拉列表的前纪录

解决方案
将在您的文本框更改事件: -

ddlNm.Items.Clear();


i have a text box and one dropdown. when i call the textbox change event the data is fill in the dropdown. when i again call the textbox change event then in dropdown list the previous and new data is add in dropdown list. i want only new data is add in dropdown and prvious record is delete means the new record overwrite the previous record of the dropdownlist.

解决方案

Write in your textbox changed event:-
ddlNm.Items.Clear();


这篇关于在ddl中的文本更改事件填充数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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