2012-05-01 50 views
2

我使用javascript来填充下拉列表。获取使用javascript创建的dropdownlist的选定值

for (var i = 1; i < array.length; i++) { 
        var optn = document.createElement("OPTION"); 
        optn.text = array[i]; 
        optn.value = array[i]; 
        document.getElementById('<%=ddlProductModel.ClientID%>').(options.addoptn); 
       } 

但我无法获取dropdownlist的选择值在代码隐藏(c#)回发中。任何解决方案?谢谢。

亚辛

回答

2

当在客户端的附加价值无法通过dropdownlist.SelectedValue访问选定的元素。尝试使用Request.Form["dropdownlistid"]

相关问题