ASP.NET Web Pages - Helpers
Web helpers greatly simplify web development and common programming tasks.
ASP.NET Helpers
ASP.NET helpers are components that can be accessed with just a few lines of Razor code.
You can build your own helpers using Razor syntax in a .cshtml file, or use the built-in ASP.NET helpers.
In the next sections of this tutorial, you will learn how to use Razor helpers.
Here is a brief description of some useful Razor helpers:
WebGrid Helper
The WebGrid helper simplifies the display of data:
- Automatically creates an HTML table to display data
- Supports different formatting options
- Supports data paging (first page, next page, previous page, last page)
- Supports sorting by clicking on list headers
Chart Helper
The Chart helper can display various types of chart images with multiple formatting options and labels.
The data displayed by the Chart helper can come from arrays, databases, or files.
WebMail Helper
The WebMail helper provides the ability to send emails using SMTP (Simple Mail Transfer Protocol).
WebImage Helper
The WebImage helper provides functions to manage images in web pages.
Keywords: flip, rotate, resize, watermark.
Third-Party Helpers
With Razor, you can use built-in or third-party helpers to simplify tasks such as email, databases, multimedia, social networking, and many other issues (like navigation and web security).
Installing Helpers
WebMatrix already includes some helpers, and you can also manually install others.
In the WebPages Helpers Reference Manual on tutorialpro.org, you can find a convenient reference manual that includes built-in helpers and others that can be manually installed and added to the ASP.NET Web Helpers Library toolkit.
If you have created a website in WebMatrix, follow these steps to install helpers:
- In WebMatrix, open the Site workspace.
- Click on Web Pages Administration.
- Log in to Web Pages Administration with a password *.
- Use the search area to search for helpers.
- Click Install to install the helpers you need.
(* If this is your first time using Web Pages Administration, you will be prompted to create a password.)