.net中html控件的下拉框,怎么取显示值?

解决方案 »

  1.   

    document.GetElementById("html控件ID").value
      

  2.   

    可用JS得到select的当前选中项的text
    var currSelectText = document.all.objSelect.options[document.all.objSelect.selectedIndex].text;
      

  3.   

    在哪里取,cs文件里面吗:Request.Form["你控件的ID"]
      

  4.   

    我没说明白 我是想在.net程序里写怎么写
      

  5.   

    using System.Collections.Specialized;NameValueCollection name = Request.Form;//集合string[] arr1 = name.GetValues("cname");//下拉框控件名
      

  6.   

    你在程序里写的话,更简单,你把html控件的runat ="server"设一下就行了。NameValueCollection name = Request.Form;
    string[] ary= name.GetValues("html控件名");
      

  7.   

    那WEB控件中的显示值怎么取值呢?