SharePoint :: Using SharePoint Designer Display SQL Server Rows (via ASP.NET Control)
上一篇 SharePoint :: Using SharePoint Designer Display SQL Server Rows (via Data Form Web Part) 提到使用 Data Form Web Part 的方式來顯示 SQL 資料庫的資料,本篇使用 ASP.NET 控制項
主要步驟有:
- 新增一個 ASPX 頁面,並插入【其他 ASP.NET 控制項】,以便選取 DataView
- 新增 Data View,並新增資料來源
- 若資料來源使用整合驗證會發生不允許連線字串含有關鍵字 Integrated Security & Trusted_Connection 之錯誤,得使用資料庫驗證 ;
- 在 SQL 中記得要加上 Schema,否則會發生物件名稱無效
- 編輯 Data View layout,並將頁面儲存在文件庫中,即可瀏覽