Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comparing HTML Helpers and Tag Helpers #27

Closed
sjharper79 opened this issue Jan 3, 2024 · 1 comment
Closed

Comparing HTML Helpers and Tag Helpers #27

sjharper79 opened this issue Jan 3, 2024 · 1 comment

Comments

@sjharper79
Copy link

Chapter: 15
Page Number: 550
Section Title: Comparing HTML Helpers and Tag Helpers
Problem to fix: At the bottom of the page the statement says that all three examples generate an HTML element that looks like <a href="/home/privacy">View our privacy policy.</a> but they don't. Instead the first and last examples (I didn't do the middle one since it's the same as the first but has named parameters) generate the following HTML.

<a href="/Index/Privacy">View our privacy policy with an HTML Helper.</a>

<a href="/Home/Privacy">View our privacy policy with a Tag Helper.</a>

Suggested solution: Update the HTML Helpers lines to use Home instead of Index.

Other useful information e.g. OS, coding tools, and so on:
When browsing to the /Index/Privacy link, error 404 is displayed. When browsing to the /home/privacy link, the private page is displayed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants