WP TutorialLesson 11Free preview
WebPages Helpers
This lesson is part of ASP · All levels
Summary
Helper is a function that packs the logic of a display or business so that it can be used repeatedly on many pages. On Web Pages, a helper can be created as a @helper function in a file in the App_Code folder or directly on the page. Using helpers makes code more concise, consistent, and easy to maintain.
Key points
- Helper is written with the syntax @helper followed by the function name and code block.
- The helper is placed in the App_Code folder so that the entire page can be used.
- Helper can receive parameters for different data for each call.
- Helper minimizes duplication of the same HTML code in many places.
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.