[AjaxPro.AjaxMethod] public DataSet GetServerTime(DataSet ds) { con.Open(); SqlDataAdapter adp = new SqlDataAdapter("select M_code,M_name from ICA", con); ds = new DataSet(); adp.Fill(ds); return ds; } // now i am binding this in javascript : function getServerTime(res) { res = _Default.GetServerTime(); var list =document.getElementById('<%= Drpscore.ClientID%>'); for(var i=0; i < res.value.Tables[0].Rows.length; i++) { opt = new Option(res.value.Tables[0].Rows[i].M_name,res.value.Tables[0].Rows[i].M_code); list.options.add(opt); } } so now i have a button that i use to insert. the problem is that dropdown selected value not appear. protected void Button1_Click(object sender, EventArgs e) { string p = ""; string t = Drpscore.selectedvalue; } // here t is coming null
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)