使用下拉列表填充文本框 [英] Populating text boxes using Dropdownlist
本文介绍了使用下拉列表填充文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
海,
我有一个下拉列表,并将其与数据源绑定,之后,当在dropdownlist中选择一个值时,我正在填充文本框.例如,当我在dropdownlist中选择客户名称时,在文本框中填充其详细信息的示例.我的问题是我已插入
ddlNameOfCustomer.Items.Insert(0, new ListItem("--Select--", "0"));
当我选择此--select--我在位置0错误处没有任何行..
如果有人知道请帮忙
Hai,
I have a dropdownlist and bind it with datasource after that i am populating textboxes when a select value in dropdownlist..example when i select customername in dropdownlist populating his details in textboxes..my problem is ive inserted
ddlNameOfCustomer.Items.Insert(0, new ListItem("--Select--", "0"));
when i select this --select-- i am getting no rows at position 0 erro..
please help if anybody knows
推荐答案
txtDistrict.Text = ds.Tables[0].Rows[0][0].ToString();
txtFullAddress.Text = ds.Tables[0].Rows[0][1].ToString()
阿南德,
通过此链接
点击此处
祝你玩得开心!
Hi anand,
Go through this link
Click Here
Have a good time!!
这篇关于使用下拉列表填充文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文