谁帮我看看这个代码.为什么response为null
<script language= "javascript " type= "text/javascript ">
function Result()
{
var type_max = document.getElementById( "DropDownList2 ");
ey_admin_ey_article.GType(type_max.value,GType_Result_CallBack);
}
function GType_Result_CallBack(response)
{
if (response.value != null)
{
alert( 'response.value != null ');
}
else
{
alert( 'response.value == null ');
}
return
}
</script>
public partial class ey_admin_ey_article : System.Web.UI.Page
{
GetStr getstr = new GetStr();
GetData getdata = new GetData();
//Ajax Start
//得到小分类名
[AjaxPro.AjaxMethod]
public DataSet GType(string type_max)
{
sql = "select type_id,type_name from type order by type_order ";
return GetDataSet(sql, "type ");
//return type_max;
}
protected void Page_Load(object sender, EventArgs e)
{
getdata.myconn = new OleDbConnection(getstr.ey_getstrConn());
AjaxPro.Utility.RegisterTypeForAjax(typeof(ey_admin_ey_article));
if (!Page.IsPostBack)
{
}
}
public DataSet GetDataSet(string sql, string strTable)
{
OleDbDataAdapter myda = new OleDbDataAdapter(sql, getdata.myconn);
DataSet myds = new DataSet();
myda.Fill(myds, strTable);
return myds;
}
}
如果我把返回的改为string。随便一条语句。。前台能够得到。现在用DataSet就一直提示response为空
[解决办法]
dataset有值吗