protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
if (DropDownList1.SelectedItem.Text=="111")
{
TextBox1.Text = "11111111111";
}
if (DropDownList1.SelectedItem.Text=="222")
{
TextBox1.Text = "22222222222";
}
if (DropDownList1.SelectedItem.Text=="333")
{
TextBox1.Text = "3333333333333";
}
if (DropDownList1.SelectedItem.Text=="444")
{
TextBox1.Text = "4444444444444";
}
}
随手写了个范例,看是否是你想要的,具体的自己写吧
{
if (DropDownList1.SelectedItem.Text=="111")
{
TextBox1.Text = "11111111111";
}
if (DropDownList1.SelectedItem.Text=="222")
{
TextBox1.Text = "22222222222";
}
if (DropDownList1.SelectedItem.Text=="333")
{
TextBox1.Text = "3333333333333";
}
if (DropDownList1.SelectedItem.Text=="444")
{
TextBox1.Text = "4444444444444";
}
}
随手写了个范例,看是否是你想要的,具体的自己写吧
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货