用ajax.net时出现value为空或不是对象的问题,代码如下,请高手指点一下cs:
[AjaxPro.AjaxNamespace("_Default")]
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
AjaxPro.Utility.RegisterTypeForAjax(typeof(_Default));
} [AjaxPro.AjaxMethod]
public string GetCityList(string str)
{
return "中华人民共和国";
}ASPX:
<script language="javascript">
function cityResult()
{
_Default.GetCityList(document.all.city.value,get_city_Result_CallBack);
}
function get_city_Result_CallBack(response)
{
if (response.value != null)
var ds = response.value;
return;
} </script>
[AjaxPro.AjaxNamespace("_Default")]
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
AjaxPro.Utility.RegisterTypeForAjax(typeof(_Default));
} [AjaxPro.AjaxMethod]
public string GetCityList(string str)
{
return "中华人民共和国";
}ASPX:
<script language="javascript">
function cityResult()
{
_Default.GetCityList(document.all.city.value,get_city_Result_CallBack);
}
function get_city_Result_CallBack(response)
{
if (response.value != null)
var ds = response.value;
return;
} </script>
response!= null