当我在下拉列表中选择项目时,该项目应显示在文本框中 [英] When i select the item in dropdown that item should be shown in textbox
本文介绍了当我在下拉列表中选择项目时,该项目应显示在文本框中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
设计如下
Code dropdonwlist
以下下拉列表代码如下
MFA
TFA
RFA
VAC
假设当我在下拉列表中选择TFA时,应在文本框中显示TFA。 />
我怎样才能在asp.net上使用csharp。
示例如下
代码TFA(下拉列表)当我选择下拉列表中的TFA时,TFA应该在文本框中
证书TFA(文本框)
问候,
Narasiman P.
Design as follows
Code dropdonwlist
In the above dropdownlist code as follows
MFA
TFA
RFA
VAC
suppose when i select the TFA in dropdown that TFA should be displayed in the textbox.
for that how can i do in asp.net using csharp.
Example as follows
Code TFA(dropdownlist) when i select the TFA in dropdown that TFA should be in textbox
Certificate TFA(textbox)
Regards,
Narasiman P.
推荐答案
在Dropdownlist的SelectedIn dexChanged
事件 [ ^ ]
你应该开始学习C#& ASP.NET。学习学习!
需要教育 [ ^ ]
Assign the selected value/Text of Dropdownlist to TextBox in Dropdownlist'sSelectedIndexChanged
Event[^]
And you should start learn C# & ASP.NET. Learn Learn Learn!
Education Needed[^]
您可以使用所选的用于填充值的组合的Chnaged事件
you can use the selected Index Chnaged event of the combo to fill the value
cmb_selectedIndexChanged()
{
textBox1.Text = cmb.SelectedItem.Text.ToString();
}
protected void DDLcardSelection_SelectedIndexChanged(object sender, EventArgs e)
{
txtval.Text=DDLcardSelection.SelectedItem.Text;
}
这篇关于当我在下拉列表中选择项目时,该项目应显示在文本框中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文