当前位置: 代码迷 >> 综合 >> 数据库工具使用
  详细解决方案

数据库工具使用

热度:56   发布时间:2024-02-06 14:46:02.0

//数据库查询语句

string sql = "select * from dbo.users";

//数据库工具调用查询
DataTable table = SqlServerHelper.ExecuteDataTable(SqlServerHelper.connectionString, CommandType.Text, sql);

//页面显示效果
Page.RegisterStartupScript("", "<script>alert('"+table.Rows[0]["username"]+"');window.location='" + Request.RawUrl + "'</script>");

  相关解决方案