DropDownlist在文本框上 [英] DropDownlist On Textbox

查看:86
本文介绍了DropDownlist在文本框上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Guys我想在文本框中绑定下拉列表Datatexfield

Hello Guys i wan to Bind Dropdownlist Datatexfield On Text box

protected void GridView1_SelectedIndexChanged1(object sender, EventArgs e)
 {
     foreach (GridViewRow row in GridView1.Rows)
     {
         if (row.RowIndex == GridView1.SelectedIndex) {
         TABLEzemota.Visible = true;

        
         Label456456.Text = (row.FindControl("DropDownList5") as Label).Text; <<< this one 

         }
         else
         {
             
         }
     }

 }



你可以帮助meee我怎样才能做到这一点


can you help meee how i can make it

推荐答案

您好,如果我理解您的问题,您需要做以下工作。



Label456456.Text =((DropDownList )row.FindControl(DropDownList5)。。SelectedItem.Value;



请告诉我这是否适合你!!!
Hello, You need to do as below if i understood your question.

Label456456.Text= ((DropDownList)row.FindControl("DropDownList5")).SelectedItem.Value;

Do let me know if this works for you !!!


这篇关于DropDownlist在文本框上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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