Advanced Tag Helper Features ..................................................................................... 739
Creating Shorthand Elements .............................................................................................................739
Prepending and Appending Content and Elements ............................................................................ 741
Getting View Context Data and Using Dependency Injection .............................................................. 745
Working with the View Model ............................................................................................................. 747
Coordinating Between Tag Helpers ..................................................................................................... 750
Suppressing the Output Element ........................................................................................................752
Summary ...................................................................................................................... 753
■Chapter 24: Using the Form Tag Helpers ����������������������������������������������������������� 755
Preparing the Example Project ..................................................................................... 756
Resetting the Views and Layout .........................................................................................................756
Working with Form Elements ....................................................................................... 758
Setting the Form Target ...................................................................................................................... 759
Using the Anti-forgery Feature ........................................................................................................... 760
Working with Input Elements ....................................................................................... 762
Configuring Input Elements ................................................................................................................ 763
Formatting Data Values ...................................................................................................................... 765
Working with Label Elements ....................................................................................... 768
Working with Select and Option Elements ................................................................... 770
Using a Data Source to Populate a select Element .............................................................................772
Generating Option Elements from an enum ........................................................................................772
Working with Text Areas ............................................................................................... 777
Understanding the Validation Form Tag Helpers .......................................................... 779
Summary ...................................................................................................................... 779
■Chapter 25: Using the Other Built-in Tag Helpers ���������������������������������������������� 781
Preparing the Example Project ..................................................................................... 782
Using the Hosting Environment Tag Helper .................................................................. 783
Using the JavaScript and CSS Tag Helpers .................................................................. 784
Managing JavaScript Files .................................................................................................................784
Managing CSS Stylesheets ................................................................................................................. 794