读书人

用SqlDataSource在Page_Load中select(

发布时间: 2012-02-01 16:58:19 作者: rapoo

用SqlDataSource在Page_Load中select()出错?
我想在页面打开时打开SqlDataSource,以便获取数据库的值

在Page_Load中的语句

this.SqlDataSource1.SelectCommand = "SELECT [用户登陆名], [地址] FROM [UserInfo] where [用户登陆名]= 'abc ' ";

this.SqlDataSource1.Select(); //报错


错误信息:
“Select”方法没有采用“0”个参数的重载错误信息


请问如何解决???

[解决办法]
这个还没用过,一直在用XSD+ObjectDataSource
[解决办法]
this.SqlDataSource1.Select(new DataSourceSelectArguments());

*****************************************************************************
欢迎使用CSDN论坛专用阅读器 : CSDN Reader(附全部源代码)

最新版本:20070212

http://www.cnblogs.com/feiyun0112/archive/2006/09/20/509783.html
[解决办法]
feiyun0112(http://feiyun0112.cnblogs.com/) 楼上正解
[解决办法]
不是说了吗?参数问题.楼上正解
[解决办法]
up
[解决办法]
ding
[解决办法]
this.SqlDataSource1.Select(DataSourceSelectArguments.Empty);

读书人网 >asp.net

热点推荐