Is it inelegant or a bad practice to use <a href in a view in asp.net mvc?












2















In asp.net mvc, mainly in .netcore version, we have some htmlhelpers and taghelpers who help us coding our front end.



I have more affinity with pure html than taghelpers or htmlhelpers.



I'd like to know if it's wrong use some tags in pure html like <a href>, <label>, <span> and so on even if the .netcore provides taghelpers or htmlhelpers for that










share|improve this question

























  • I prefer to write pure HTML as much as I can.

    – Shyju
    Nov 22 '18 at 20:18











  • me too, but I don't know if it's common to work this way

    – estudanteeterno
    Nov 22 '18 at 20:28













  • why do you want to do this? use tag helpers

    – Alexan
    Nov 22 '18 at 20:45











  • Using pure html will not only help people who don't understand much about taghelpers, it will also help you to eventually migrate and improve your html since you're not tied to a framework (at least on the templates).

    – Rafael A. M. S.
    Nov 22 '18 at 20:47
















2















In asp.net mvc, mainly in .netcore version, we have some htmlhelpers and taghelpers who help us coding our front end.



I have more affinity with pure html than taghelpers or htmlhelpers.



I'd like to know if it's wrong use some tags in pure html like <a href>, <label>, <span> and so on even if the .netcore provides taghelpers or htmlhelpers for that










share|improve this question

























  • I prefer to write pure HTML as much as I can.

    – Shyju
    Nov 22 '18 at 20:18











  • me too, but I don't know if it's common to work this way

    – estudanteeterno
    Nov 22 '18 at 20:28













  • why do you want to do this? use tag helpers

    – Alexan
    Nov 22 '18 at 20:45











  • Using pure html will not only help people who don't understand much about taghelpers, it will also help you to eventually migrate and improve your html since you're not tied to a framework (at least on the templates).

    – Rafael A. M. S.
    Nov 22 '18 at 20:47














2












2








2








In asp.net mvc, mainly in .netcore version, we have some htmlhelpers and taghelpers who help us coding our front end.



I have more affinity with pure html than taghelpers or htmlhelpers.



I'd like to know if it's wrong use some tags in pure html like <a href>, <label>, <span> and so on even if the .netcore provides taghelpers or htmlhelpers for that










share|improve this question
















In asp.net mvc, mainly in .netcore version, we have some htmlhelpers and taghelpers who help us coding our front end.



I have more affinity with pure html than taghelpers or htmlhelpers.



I'd like to know if it's wrong use some tags in pure html like <a href>, <label>, <span> and so on even if the .netcore provides taghelpers or htmlhelpers for that







asp.net-mvc asp.net-core asp.net-core-mvc asp.net-core-2.0 asp.net-core-2.1






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 22 '18 at 20:21







estudanteeterno

















asked Nov 22 '18 at 20:17









estudanteeternoestudanteeterno

133




133













  • I prefer to write pure HTML as much as I can.

    – Shyju
    Nov 22 '18 at 20:18











  • me too, but I don't know if it's common to work this way

    – estudanteeterno
    Nov 22 '18 at 20:28













  • why do you want to do this? use tag helpers

    – Alexan
    Nov 22 '18 at 20:45











  • Using pure html will not only help people who don't understand much about taghelpers, it will also help you to eventually migrate and improve your html since you're not tied to a framework (at least on the templates).

    – Rafael A. M. S.
    Nov 22 '18 at 20:47



















  • I prefer to write pure HTML as much as I can.

    – Shyju
    Nov 22 '18 at 20:18











  • me too, but I don't know if it's common to work this way

    – estudanteeterno
    Nov 22 '18 at 20:28













  • why do you want to do this? use tag helpers

    – Alexan
    Nov 22 '18 at 20:45











  • Using pure html will not only help people who don't understand much about taghelpers, it will also help you to eventually migrate and improve your html since you're not tied to a framework (at least on the templates).

    – Rafael A. M. S.
    Nov 22 '18 at 20:47

















I prefer to write pure HTML as much as I can.

– Shyju
Nov 22 '18 at 20:18





I prefer to write pure HTML as much as I can.

– Shyju
Nov 22 '18 at 20:18













me too, but I don't know if it's common to work this way

– estudanteeterno
Nov 22 '18 at 20:28







me too, but I don't know if it's common to work this way

– estudanteeterno
Nov 22 '18 at 20:28















why do you want to do this? use tag helpers

– Alexan
Nov 22 '18 at 20:45





why do you want to do this? use tag helpers

– Alexan
Nov 22 '18 at 20:45













Using pure html will not only help people who don't understand much about taghelpers, it will also help you to eventually migrate and improve your html since you're not tied to a framework (at least on the templates).

– Rafael A. M. S.
Nov 22 '18 at 20:47





Using pure html will not only help people who don't understand much about taghelpers, it will also help you to eventually migrate and improve your html since you're not tied to a framework (at least on the templates).

– Rafael A. M. S.
Nov 22 '18 at 20:47












1 Answer
1






active

oldest

votes


















1














No, it's not inelegant or bad practice to use html anchor tags instead of tag helpers. I've seen plenty of projects with pure html anchors that were easy to read and maintain.



If you're using named routes, html helpers might save you some refactoring because you can change controllers and actions in your route configuration without having to update your links. But if that's not a big deal to you, don't worry about it.






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53437563%2fis-it-inelegant-or-a-bad-practice-to-use-a-href-in-a-view-in-asp-net-mvc%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    No, it's not inelegant or bad practice to use html anchor tags instead of tag helpers. I've seen plenty of projects with pure html anchors that were easy to read and maintain.



    If you're using named routes, html helpers might save you some refactoring because you can change controllers and actions in your route configuration without having to update your links. But if that's not a big deal to you, don't worry about it.






    share|improve this answer




























      1














      No, it's not inelegant or bad practice to use html anchor tags instead of tag helpers. I've seen plenty of projects with pure html anchors that were easy to read and maintain.



      If you're using named routes, html helpers might save you some refactoring because you can change controllers and actions in your route configuration without having to update your links. But if that's not a big deal to you, don't worry about it.






      share|improve this answer


























        1












        1








        1







        No, it's not inelegant or bad practice to use html anchor tags instead of tag helpers. I've seen plenty of projects with pure html anchors that were easy to read and maintain.



        If you're using named routes, html helpers might save you some refactoring because you can change controllers and actions in your route configuration without having to update your links. But if that's not a big deal to you, don't worry about it.






        share|improve this answer













        No, it's not inelegant or bad practice to use html anchor tags instead of tag helpers. I've seen plenty of projects with pure html anchors that were easy to read and maintain.



        If you're using named routes, html helpers might save you some refactoring because you can change controllers and actions in your route configuration without having to update your links. But if that's not a big deal to you, don't worry about it.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 22 '18 at 22:52









        ChrisChris

        6,50685487




        6,50685487
































            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53437563%2fis-it-inelegant-or-a-bad-practice-to-use-a-href-in-a-view-in-asp-net-mvc%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            這個網誌中的熱門文章

            Tangent Lines Diagram Along Smooth Curve

            Yusuf al-Mu'taman ibn Hud

            Zucchini