我更新鲜,我为我的sql表创建了一个存储过程,我想将这些数据显示到aspx页面中。
我需要..ajax,js,asp.net
的代码答案 0 :(得分:1)
从头顶像这样:
using (SqlConnection con = new SqlConnection(ConnectionString)) {
con.Open();
using (SqlCommand command = new SqlCommand("ProcedureName", con)) {
command.CommandType = CommandType.StoredProcedure;
using(SqlReader reader = command.ExecuteReader()){
if (reader.HasRows) {
while(reader.Read()) {
... process SqlReader objects...
}
}
}
}
}
编辑:抱歉,错过了“检索”信息。