ajax返回空值
<script language= "javascript " type= "text/javascript ">
function statusResult()
{
var ss=document.getElementById( "ddlStatus ");
AjaxMethod.GetStatusWhyList(ss.value,get_status_Result_CallBack);
}
function get_status_Result_CallBack(response)
{
if (response.value != null)
{
document.all( "ddlStatusWhy ").length=0;
var ds1 = response.value;
if(ds1 != null && typeof(ds1) == "object " && ds1.Tables != null)
{
for(var ii=0; ii <ds1.Tables[0].Rows.length; ii++)
{
var name1=ds1.Tables[0].Rows[ii].Title;
//alert(ds1.Tables[0].Rows.length);
var id1=ds1.Tables[0].Rows[ii].Title;
document.all( "ddlStatusWhy ").options.add(new Option(name1,id1));
}
}
}
return
}
</script>
ds1.tables[0].rows[ii].title返回undefault
ds1.Tables[0].Rows.length返回的数字正常
请各位大侠帮忙看一下,谢谢
ajaxMethod.cs:
#region GetDataSet
public static DataSet GetDataSet(string sql)