Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 342317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T10:47:32+00:00 2026-05-12T10:47:32+00:00

It is quite possible that I may not have got the point, but I

  • 0

It is quite possible that I may not have got the point, but I really can’t figure out how ASP.NET MVC’s HTML Helpers can help me. Here’s a sample: –

HTML:

<a href="ActionName" target="_blank">Click Me</a>

HTML Helper:

<%= Html.ActionLink("Click me", "ActionName", null, new {target="blank"}) %>

My eyes are reading HTML more easily, and it seems counter-intuitive to use the HTML Helpers.

Look at the following arguments:

  • A lot of people (even novices) know how to read HTML. The HTML Helper syntax can confuse easily.
  • In many cases you need to do more typing writing an HTML ‘helper’, then you need to write the actual HTML.
  • The HTML Helper is going to spew real HTML anyway, so why not write HTML directly?
  • Writing HTML gives you more control over the syntax, and the standards. You can make it conform to whatever HTML standard you want.

Are there any special compelling reasons that I have not understood (since I am self-educated in MVC and there could be gaps) that should make me want to prefer HTML Helpers?

Or are they just code noise?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T10:47:32+00:00Added an answer on May 12, 2026 at 10:47 am

    The primary reason you don’t use <a> tags directly is that you don’t want to hardcode URLs in your application. The Html.ActionLink method will abstract away the URL generation and you’ll specify the controller, action, and other parameters.

    So, basically, the two lines you posted in your question are not really equivalent. You should consider adding the dynamic URL generation code to the <a> tag to make them functionally equivalent. Beside that, if you output HTML directly, you’ll have to be extremely careful about HTML encoding stuff. Html.ActionLink will do this job for you too.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Making a generic property I'm not quite sure how to do that,
Not quite sure how to phrase this, but will do my best. I have
I may not quite have my head around the IOrderedEnumerable<T> collection. If I have
It is quite possible that I'm just looking for help finding the name of
I'm not quite sure if it's possible to do what I'm about to ask
I'm not quite sure where to go with the initially... I've got an application
I have a site hat lists a set of files that can be downloaded.
I have been using Apache POI for quite sometime and it works great but
Possible Duplicate: Puzzling Enumerable.Cast InvalidCastException Hi, I just noticed something quite strange with the
My question is quite simple. Is it possible to inactivate all toasts of an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.