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

Language Switcher Tag helper #552

Open
hishamco opened this issue Sep 11, 2018 · 3 comments
Open

Language Switcher Tag helper #552

hishamco opened this issue Sep 11, 2018 · 3 comments
Labels
To be consider We might or might not implement

Comments

@hishamco
Copy link
Member

No description provided.

@thiennn
Copy link
Contributor

thiennn commented Sep 11, 2018

What is the benefit of Tag helper over Partial view?

@hishamco
Copy link
Member Author

Hope we will discuss this in details after finishing the localization stuff

@thiennn thiennn added the To be consider We might or might not implement label Oct 17, 2018
@rafsanulhasan
Copy link
Contributor

@thiennn I think using tag helpers over razor syntax make the code more readable. (its not about tag helpers vs partial views)

Consider the following code snippet for rendering partial views using tag helpers instead of razor syntax

<partial name="a" for="model"/>

###OVER

@Html.Partial()

Tag Helpers simplifies the code and makes it more readable while HtmlHelpers (Razor) makes it hard to read and maintain.

Look at the following page to render partial view using both HtmlHelpers nd tag helpers
https://docs.microsoft.com/en-us/aspnet/core/mvc/views/tag-helpers/built-in/partial-tag-helper?view=aspnetcore-3.1

More about Tag Helpers VS Razor Syntax here:
https://docs.microsoft.com/en-us/aspnet/core/mvc/views/tag-helpers/intro?view=aspnetcore-3.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
To be consider We might or might not implement
Projects
None yet
Development

No branches or pull requests

3 participants