简单教程
提交运行
代码编辑器:
@Code Dim db = Database.Open("SmallBakery") Dim query = "SELECT * FROM Product" Dim data = db.Query(query) Dim grid = new WebGrid(data) End Code <!DOCTYPE html> <meta charset="utf-8"/> <title>Displaying Data Using the WebGrid Helper</title> </head> <body> <h1>Small Bakery Products</h1> <div id="grid"> @grid.GetHtml() </div>
运行结果: