在使用ajaxpro遇到的问题,请高手指教! 没有碰到过哦,贴出你的sql语句! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 http://community.csdn.net/Expert/topic/5378/5378258.xml?temp=.5636713 fphuang(人在哈尔滨·细节决定成败)我就是用你的JS代码写的啊。你后台返回的表是自己用代码建的,我是查询数据库得出来的表,但是就是返回不了啊! [AjaxPro.AjaxMethod()] public string CreateDouscre() { SqlConnection conn = new SqlConnection(this.SqlDataSource1.ConnectionString); string str = "select * from Orders"; SqlDataAdapter da = new SqlDataAdapter(str,conn); DataTable dt = new DataTable(); da.Fill(dt); return dt; }这个就是我在后台返回的表的代码啊! 把datatable改成dataset或者把sql语句改为这样试试:"set nocount on;select * from Orders;set nocount off;" 这个方法有点问题哦.该方法返回的是string而你在返回时,却返回了一个dt.[AjaxPro.AjaxMethod()] public DataTable CreateDouscre() { SqlConnection conn = new SqlConnection(this.SqlDataSource1.ConnectionString); string str = "select * from Orders"; SqlDataAdapter da = new SqlDataAdapter(str,conn); DataSet ds = new DataSet(); da.Fill(ds); return ds.Tables[0]; } 没什么意见了,你在后台返回的时候判断下,if(dt.Rows.Count>0) return dt; babyrockxray(Game~Over) (你的方法不行啊!还有谁有更好的解决方法吗? nyzfl(小丫头是我心爱的女人 My-Blog地址:http://fenglin.xl)我也判断了,返回的表是有数据的啊,但是在前台接收不了后台返回的表啊。随便问下,ajaxpro中有DataTable 和DataSet这样的数据表和数据集吗? |zyciis| UserControl添加子标签后,如何给这个标签添加属性和让这个标签为List<>类型,谢谢 如何全部删除记录中的超链接标签? asp.net页面传值问题?? GridView复制当前单元格到剪贴板后如何去除空格? 管理员权限的问题 IE7下 Active控件上的图片无法显示 自定义控件本身刷新的时候,能不能不刷新自定义控件所在的页面? 我在运行一个带有水晶报表的WEB程序的时候,出现错误不知道为什么? web.config如何配置起始页 存储过程分页 在detailsview中插入时说类型不对 asp.net 求Css样式表...?
我就是用你的JS代码写的啊。你后台返回的表是自己用代码建的,我是查询数据库得出来的表,但是就是返回不了啊!
public string CreateDouscre()
{
SqlConnection conn = new SqlConnection(this.SqlDataSource1.ConnectionString);
string str = "select * from Orders";
SqlDataAdapter da = new SqlDataAdapter(str,conn);
DataTable dt = new DataTable();
da.Fill(dt);
return dt;
}
这个就是我在后台返回的表的代码啊!
或者把sql语句改为这样试试:"set nocount on;select * from Orders;set nocount off;"
该方法返回的是string而你在返回时,却返回了一个dt
.[AjaxPro.AjaxMethod()]
public DataTable CreateDouscre()
{
SqlConnection conn = new SqlConnection(this.SqlDataSource1.ConnectionString);
string str = "select * from Orders";
SqlDataAdapter da = new SqlDataAdapter(str,conn);
DataSet ds = new DataSet();
da.Fill(ds);
return ds.Tables[0];
}
if(dt.Rows.Count>0)
return dt;
你的方法不行啊!还有谁有更好的解决方法吗?
我也判断了,返回的表是有数据的啊,但是在前台接收不了后台返回的表啊。
随便问下,ajaxpro中有DataTable 和DataSet这样的数据表和数据集吗?