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 7771881
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T16:45:25+00:00 2026-06-01T16:45:25+00:00

I haven’t done MVC2 (or any MVC really) in over a year and while

  • 0

I haven’t done MVC2 (or any MVC really) in over a year and while this works, I want to make sure it’s the best way.

I have a “splash” page that allows the user to choose what they want to work on; Interfaces, Events, Parameters or Tasks. The HTML is:

<a href="/Interfaces/Index">
    <div id="homeInterfaces" class="homeLinks">
        <h1>Interfaces</h1>
        <h2>Create, Edit or Delete Interfaces</h2>
    </div>
</a>
<a href="/Tasks/Index">
    <div id="homeTasks" class="homeLinks">
        <h1>Tasks</h1>
        <h2>Create, Edit or Delete Tasks</h2>
    </div>
</a>
<a href="/Parameters/Index">
    <div id="homeParameters" class="homeLinks">
        <h1>Parameters</h1>
        <h2>Create, Edit or Delete Parameters</h2>
    </div>
</a>
<a href="/Events/Index">
    <div id="homeEvents" class="homeLinks">
        <h1>Events</h1>
        <h2>Create, Edit or Delete Events</h2>
    </div>
</a>

The links work and go to the appropriate pages, but for whatever reason, I’m not sure if this is the proper way to go about it. I have controllers for each, the proper folders with the Index views for each. I don’t think I should be using Html.ActionLink, but maybe there’s something else I should be using. Any thoughts? Thanks.

  • 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-06-01T16:45:26+00:00Added an answer on June 1, 2026 at 4:45 pm

    Yes, you should be using a helper for these. This will ensure that your generated links use the appropriate routes, which will make your life much easier in the future if you do anything fancy with your URLs or deploy to a non-root path (i.e. /)

    In your case, the easiest solution is to replace the URL with @Url.Action. I’d use that over Html.ActionLink because Html.ActionLink doesn’t let you easily linkify content more complicated than simple text (e.g. your html).

    <a href="@Url.Action("Index", "Interfaces")">
      <div id="homeInterfaces" class="homeLinks">
        <h1>Interfaces</h1>
        <h2>Create, Edit or Delete Interfaces</h2>
      </div>
    </a>
    

    If you’re not using Razor, go switch to that first. It’s worth it. Or drop the @ sign and add some <%= ... %>.

    As @MichalFran notes, though, if it’s working now, you can always just start following this advice in the future and revisit what you’ve already done when/if you need to down the road.

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

Sidebar

Related Questions

I haven't found any documentation on this or seen this done before, but is
I haven't been able to find any real documentation on this, so I'm wondering
I haven't actually done this yet, and maybe I don't need to, but it
haven't used regex replaces much and am not sure if how I have done
I haven't found any information on MSDN regarding this problem. If we create an
I haven't browsed through the spec, though I doubt any info is in there.
I haven't touched Java since using JBuilder in the late 90's while at University,
I haven't found this question, feel free to close if it's already up here.
I haven't found any references to apps that use a custom activity indicator --
I haven't been able to find any documentation on Android's sync services, so far

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.