Asp. Display database data through WebGrid in net razor

From , 5 Years ago, written in C#, viewed 135 times.
URL https://pastebin.vip/view/36107e6b
  1. @{
  2. var db = Database.Open("SmallBakery") ;
  3. var query = "SELECT * FROM Product ORDER BY Id";
  4. var data = db.Query(query);
  5. var grid = new WebGrid(data);
  6. }
  7. <html>
  8. <head>
  9. <title>Displaying Data Using the WebGrid Helper</title>
  10. </head>
  11. <body>
  12. <h1>Small Bakery Products</h1>
  13. <div id="grid">
  14. @grid.GetHtml()
  15. </div>
  16. </body>
  17. </html>
  18. //csharp/8158

Reply to "Asp. Display database data through WebGrid in net razor"

Here you can reply to the paste above

captcha

https://burned.cc - Burn After Reading Website