How to get the value from selected text by select combobox?Here is the aspx.cs code for bind combobox
service.BindHTMLDropdownList(cmb_labelno, "tbl_StockRunning", "StockTagNo", "StockId", "where IsActive = 1 and StockTypePrefix = 'T' and " +"BranchId = " + Session["BranchId"] +"");
Combobox Name : cmb_labelnoTable Name : tbl_StockRunningText : StockTagNoValue : StockId
Here is the aspx code
<select id="cmb_labelno" runat="server"></select><input type="button" id="btnGetStock" value="VIEW"/>$("#btnGetStock").click(function (e) { alert(document.getElementById('cmb_labelno').value);});
Now, the place of alert(document.getElementById('cmb_labelno').value I usedalert(document.getElementById('cmb_labelno').val also still value is not showing.
While the same thing if I am doing in Jquery still showing the selectedtext only not valueHere is my Jquery code,
document.getElementById('<%= cmb_labelno.ClientID %>').value
Is there any problem in code...???