Razor – Display Data using WebGrid

In this chapter you will learn

  • What is WebGrid?
  • How to display data using WebGrid?
  • Programming Example

What is WebGrid?

WebGrid is new technology to display data in tabular format. It is launch with ASP MVC. It is lightweight, easy to use and works well with Razor Syntax. It adds paging automatically.

How to declare WebGrid?

You can declare WebGrid as follow

How to display data using WebGrid?


Programming Example

  • Output

    IDBookNameAuthor
    1 2 3 >
    1C#Christian Nagel
    2ASP.NET MVCSimone Chiaretta
    3Microsoft SQL ServerPaul Turley
    4Android ProgrammingDiMarzio Jerome
    5ScalaJanek Bogucki
    6.NET Core 1.0Christian Nagel
    7Visual Studio 2015William Penberthy
    8Swift IOSAbhishek Mishra
    9Visual Basic 2015Bryan Newsome
    10PythonLuke Sneeringer

    Summary

    In this chapter you learned to use WebGrid in Razor Syntax. In the next chapter you will get some programming exercise questions. You must do practice. It will help you to understand Razor Programming more deeply.


    Leave a Reply

    Your email address will not be published. Required fields are marked *